]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - Gruntfile.js
1 module
.exports = function (grunt
) {
2 require('load-grunt-tasks')(grunt
);
5 appDir: 'app/Resources/static',
6 buildDir: 'app/Resources/build',
7 modulesDir: 'node_modules',
8 releaseDir: 'web/bundles/wallabagcore',
15 require('autoprefixer')({ browsers: 'last 2 versions' }),
19 src: '<%= buildDir %>/material.css',
20 dest: '<%= releaseDir %>/themes/material/css/style.min.css',
26 require('autoprefixer')({ browsers: 'last 2 versions' }),
30 src: '<%= buildDir %>/baggy.css',
31 dest: '<%= releaseDir %>/themes/baggy/css/style.min.css',
40 'node_modules/materialize-css/bin/materialize.css',
41 '<%= appDir %>/themes/material/css/*.css',
43 dest: '<%= buildDir %>/material.css',
47 '<%= appDir %>/themes/baggy/css/*.css',
49 dest: '<%= buildDir %>/baggy.css',
55 '<%= buildDir %>/material.browser.js': ['<%= appDir %>/themes/material/js/init.js'],
56 '<%= buildDir %>/baggy.browser.js': ['<%= appDir %>/themes/baggy/js/init.js']
64 }], ["browserify-shim", {
68 "materialize": "materialize",
77 "jQuery": "./node_modules/jquery/dist/jquery.js",
78 "jquery.tinydot": "./node_modules/jquery.tinydot/src/jquery.tinydot.js",
79 "jquery.ui": "./node_modules/jquery-ui-browserify/dist/jquery-ui.js"
88 '<%= releaseDir %>/themes/material/js/material.min.js':
89 ['<%= buildDir %>/material.browser.js'],
94 '<%= releaseDir %>/themes/baggy/js/baggy.min.js':
95 ['<%= buildDir %>/baggy.browser.js'],
102 cwd: '<%= modulesDir %>/pickadate/lib',
104 dest: '<%= buildDir %>',
108 cwd: '<%= modulesDir %>/annotator/pkg',
109 src: 'annotator.min.js',
110 dest: '<%= buildDir %>/themes/_global/js/',
116 cwd: '<%= modulesDir %>/icomoon-free-npm/Font',
117 src: 'IcoMoon-Free.ttf',
118 dest: '<%= releaseDir %>/themes/baggy/fonts/',
122 cwd: '<%= modulesDir %>/ptsans-npm-webfont/fonts',
123 src: 'ptsansbold.woff',
124 dest: '<%= releaseDir %>/themes/baggy/fonts/',
128 cwd: '<%= modulesDir %>/material-design-icons-iconfont/dist/fonts/',
129 src: ['MaterialIcons-Regular.eot', 'MaterialIcons-Regular.woff2', 'MaterialIcons-Regular.woff', 'MaterialIcons-Regular.ttf'],
130 dest: '<%= releaseDir %>/themes/baggy/fonts/',
139 cwd: '<%= modulesDir %>/icomoon-free-npm/Font',
140 src: 'IcoMoon-Free.ttf',
141 dest: '<%= releaseDir %>/themes/material/fonts',
146 cwd: '<%= modulesDir %>/roboto-fontface/fonts/Roboto',
148 dest: '<%= releaseDir %>/themes/material/font/roboto',
153 cwd: '<%= modulesDir %>/material-design-icons-iconfont/dist/fonts/',
154 src: ['MaterialIcons-Regular.eot', 'MaterialIcons-Regular.woff2', 'MaterialIcons-Regular.woff', 'MaterialIcons-Regular.ttf'],
155 dest: '<%= releaseDir %>/themes/material/fonts/',
166 cwd: '<%= appDir %>/themes/_global/',
168 dest: '<%= releaseDir %>/themes/_global/',
175 src: ['<%= buildDir %>/**/*.css'],
178 src: ['<%= buildDir %>/**/*.js', '<%= buildDir %>/**/*.map'],
181 src: ['./<%= buildDir %>'],
184 src: ['./<%= releaseDir %>/*'],
188 target: ['<%= appDir %>/themes/material/js/init.js', '<%= appDir %>/themes/baggy/js/init.js']
191 target: ['<%= appDir %>/themes/material/css/*.css', '<%= appDir %>/themes/baggy/css/*.css']
199 ['copy:baggyfonts', 'copy:materialfonts']
204 'Build and install js files',
205 ['clean:js', 'copy:pickerjs', 'browserify', 'uglify']
210 'Build and install everything',
211 ['clean', 'copy:pickerjs', 'concat', 'browserify', 'uglify', 'postcss', 'copy', 'symlink']
216 'Compiles the stylesheets.',
217 ['clean:css', 'concat:cssMaterial', 'concat:cssBaggy', 'postcss']
222 'Test css and js style conformity',
223 ['eslint', 'stylelint', 'default']