X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=Gruntfile.js;h=72a407f921c9346421a98a219bcce8285103a4c3;hb=40f3ab5311eda3c52f072b8a141814ec300f1ea4;hp=bd0d6dda40092f6c99013689f65d676cff379e8b;hpb=a494c33ef7e574e68ab5bb83d0bdbd67348af0ef;p=github%2Fwallabag%2Fwallabag.git diff --git a/Gruntfile.js b/Gruntfile.js index bd0d6dda..72a407f9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -10,10 +10,6 @@ module.exports = function (grunt) { postcss: { material: { options: { - map: { - inline: false, - }, - processors: [ require('pixrem')(), require('autoprefixer')({ browsers: 'last 2 versions' }), @@ -25,10 +21,6 @@ module.exports = function (grunt) { }, baggy: { options: { - map: { - inline: false, - }, - processors: [ require('pixrem')(), require('autoprefixer')({ browsers: 'last 2 versions' }), @@ -95,19 +87,13 @@ module.exports = function (grunt) { files: { '<%= releaseDir %>/themes/material/js/material.min.js': ['<%= buildDir %>/material.browser.js'], - }, - options: { - sourceMap: true, - }, + } }, baggy: { files: { '<%= releaseDir %>/themes/baggy/js/baggy.min.js': ['<%= buildDir %>/baggy.browser.js'], - }, - options: { - sourceMap: true, - }, + } }, }, copy: { @@ -123,27 +109,22 @@ module.exports = function (grunt) { src: 'annotator.min.js', dest: '<%= buildDir %>/themes/_global/js/', }, - }, - symlink: { baggyfonts: { files: [ { expand: true, - overwrite: true, cwd: '<%= modulesDir %>/icomoon-free-npm/Font', src: 'IcoMoon-Free.ttf', dest: '<%= releaseDir %>/themes/baggy/fonts/', }, { expand: true, - overwrite: true, cwd: '<%= modulesDir %>/ptsans-npm-webfont/fonts', src: 'ptsansbold.woff', dest: '<%= releaseDir %>/themes/baggy/fonts/', }, { expand: true, - overwrite: true, cwd: '<%= modulesDir %>/material-design-icons-iconfont/dist/fonts/', src: ['MaterialIcons-Regular.eot', 'MaterialIcons-Regular.woff2', 'MaterialIcons-Regular.woff', 'MaterialIcons-Regular.ttf'], dest: '<%= releaseDir %>/themes/baggy/fonts/', @@ -175,6 +156,8 @@ module.exports = function (grunt) { }, ], }, + }, + symlink: { pics: { files: [ { @@ -201,12 +184,19 @@ module.exports = function (grunt) { src: ['./<%= releaseDir %>/*'], } }, + eslint: { + target: ['<%= appDir %>/themes/material/js/init.js', '<%= appDir %>/themes/baggy/js/init.js'] + }, + stylelint: { + target: ['<%= appDir %>/themes/material/css/*.css', '<%= appDir %>/themes/baggy/css/*.css'] + } + }); grunt.registerTask( 'fonts', 'Install fonts', - ['symlink:baggyfonts', 'symlink:materialfonts'] + ['copy:baggyfonts', 'copy:materialfonts'] ); grunt.registerTask( @@ -218,7 +208,7 @@ module.exports = function (grunt) { grunt.registerTask( 'default', 'Build and install everything', - ['clean', 'copy:pickerjs', 'concat', 'browserify', 'uglify', 'postcss', 'symlink'] + ['clean', 'copy:pickerjs', 'concat', 'browserify', 'uglify', 'postcss', 'copy', 'symlink'] ); grunt.registerTask( @@ -226,4 +216,10 @@ module.exports = function (grunt) { 'Compiles the stylesheets.', ['clean:css', 'concat:cssMaterial', 'concat:cssBaggy', 'postcss'] ); + + grunt.registerTask( + 'tests', + 'Test css and js style conformity', + ['eslint', 'stylelint', 'default'] + ) };