forked from Icycoide/searxng
[mod] add stylelint process to target themes.simple
Before build, do lint the LESS files using stylelint [1]. The configuration 'stylelint-config-standard' [2] is added to the root of the simple theme [3]. [1] https://stylelint.io/ [2] https://github.com/stylelint/stylelint-config-standard [3] https://stylelint.io/user-guide/configure Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
e73a96b5f9
commit
dfc5c3bc15
3 changed files with 28 additions and 3 deletions
|
@ -23,6 +23,14 @@ module.exports = function(grunt) {
|
|||
}
|
||||
}
|
||||
},
|
||||
stylelint: {
|
||||
options: {
|
||||
formatter: 'unix',
|
||||
},
|
||||
src: [
|
||||
'src/less/**/*.less',
|
||||
]
|
||||
},
|
||||
copy: {
|
||||
js: {
|
||||
expand: true,
|
||||
|
@ -191,8 +199,17 @@ module.exports = function(grunt) {
|
|||
grunt.loadNpmTasks('grunt-contrib-less');
|
||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||
grunt.loadNpmTasks('grunt-webfont');
|
||||
grunt.loadNpmTasks('grunt-stylelint');
|
||||
|
||||
grunt.registerTask('test', ['jshint']);
|
||||
|
||||
grunt.registerTask('default', ['jshint', 'copy', 'concat', 'uglify', 'less:development', 'less:production']);
|
||||
grunt.registerTask('default', [
|
||||
'jshint',
|
||||
'stylelint',
|
||||
'copy',
|
||||
'concat',
|
||||
'uglify',
|
||||
'less:development',
|
||||
'less:production'
|
||||
]);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue