X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=Gruntfile.js;h=72473b21c5d0aced6976698d2641674c381e19e2;hb=d37081e50b5c6f6d6d37523ab51082947c54fe03;hp=a19f294080139e248619c2141faf8340ecd994d7;hpb=ca8f9bdc1507e8a1f1d7500fb52a0dcb64de237a;p=github%2Fwallabag%2Fwallabag.git diff --git a/Gruntfile.js b/Gruntfile.js index a19f2940..72473b21 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: { @@ -198,6 +184,16 @@ 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'] + }, + watch: { + files: ['<%= appDir %>/**/*.css', '<%= appDir %>/**/*.js'], + tasks: ['css', 'js'] + } }); grunt.registerTask( @@ -223,4 +219,12 @@ 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'] + ), + + grunt.loadNpmTasks('grunt-contrib-watch'); };