diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-09-28 10:30:18 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2016-09-28 10:30:18 +0200 |
commit | c146f6940a176142084b4fc3c610d13aca60d90e (patch) | |
tree | 7bc4683febcf15a4fd6053bddd49e36c202adeda /Gruntfile.js | |
parent | 55345331c47ca6f389e38a842584c3062476601d (diff) | |
download | wallabag-c146f6940a176142084b4fc3c610d13aca60d90e.tar.gz wallabag-c146f6940a176142084b4fc3c610d13aca60d90e.tar.zst wallabag-c146f6940a176142084b4fc3c610d13aca60d90e.zip |
Assets work
* ES6 all the things !
* ESLint checks everything
* CSS fixes (use stylelint)
* Fix #2231
Diffstat (limited to 'Gruntfile.js')
-rw-r--r-- | Gruntfile.js | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index 8dc5b83b..92774081 100644 --- a/Gruntfile.js +++ b/Gruntfile.js | |||
@@ -41,27 +41,6 @@ module.exports = function (grunt) { | |||
41 | options: { | 41 | options: { |
42 | separator: ';', | 42 | separator: ';', |
43 | }, | 43 | }, |
44 | jsMaterial: { | ||
45 | src: [ | ||
46 | '<%= appDir %>/themes/material/js/init.js', | ||
47 | '<%= appDir %>/themes/_global/js/restoreScroll.js', | ||
48 | 'node_modules/jquery.tinydot/src/jquery.tinydot.js', | ||
49 | ], | ||
50 | dest: '<%= buildDir %>/material.js', | ||
51 | }, | ||
52 | jsBaggy: { | ||
53 | src: [ | ||
54 | '<%= appDir %>/themes/baggy/js/init.js', | ||
55 | '<%= appDir %>/themes/_global/js/restoreScroll.js', | ||
56 | '<%= appDir %>/themes/baggy/js/autoClose.js', | ||
57 | '<%= appDir %>/themes/baggy/js/autoCompleteTags.js', | ||
58 | '<%= appDir %>/themes/baggy/js/closeMessage.js', | ||
59 | '<%= appDir %>/themes/baggy/js/popupForm.js', | ||
60 | // Save link is no more used for now | ||
61 | // '<%= appDir %>/themes/baggy/js/saveLink.js', | ||
62 | ], | ||
63 | dest: '<%= buildDir %>/baggy.js', | ||
64 | }, | ||
65 | cssMaterial: { | 44 | cssMaterial: { |
66 | src: [ | 45 | src: [ |
67 | 'node_modules/materialize-css/bin/materialize.css', | 46 | 'node_modules/materialize-css/bin/materialize.css', |
@@ -77,8 +56,27 @@ module.exports = function (grunt) { | |||
77 | }, | 56 | }, |
78 | }, | 57 | }, |
79 | browserify: { | 58 | browserify: { |
80 | '<%= buildDir %>/material.browser.js': ['<%= buildDir %>/material.js'], | 59 | dist: { |
81 | '<%= buildDir %>/baggy.browser.js': ['<%= buildDir %>/baggy.js'], | 60 | files: { |
61 | '<%= buildDir %>/material.browser.js': ['<%= appDir %>/themes/material/js/init.js'], | ||
62 | '<%= buildDir %>/baggy.browser.js': ['<%= appDir %>/themes/baggy/js/init.js'] | ||
63 | } | ||
64 | }, | ||
65 | options: { | ||
66 | sourceType: "module", | ||
67 | transform: [ | ||
68 | ["babelify", { | ||
69 | presets: ["es2015"] | ||
70 | }], "browserify-shim" | ||
71 | ], | ||
72 | browserifyOptions: { | ||
73 | browser: { | ||
74 | "jQuery": "./node_modules/jquery/dist/jquery.js", | ||
75 | "jquery.tinydot": "./nodes_modules/jquery.tinydot/src/jquery.tinydot.js" | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | |||
82 | }, | 80 | }, |
83 | uglify: { | 81 | uglify: { |
84 | material: { | 82 | material: { |
@@ -199,7 +197,7 @@ module.exports = function (grunt) { | |||
199 | grunt.registerTask( | 197 | grunt.registerTask( |
200 | 'js', | 198 | 'js', |
201 | 'Build and install js files', | 199 | 'Build and install js files', |
202 | ['clean:js', 'copy:pickerjs', 'concat:jsMaterial', 'concat:jsBaggy', 'browserify', 'uglify'] | 200 | ['clean:js', 'copy:pickerjs', 'browserify', 'uglify'] |
203 | ); | 201 | ); |
204 | 202 | ||
205 | grunt.registerTask( | 203 | grunt.registerTask( |