summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/CodeEditor/Gruntfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/CodeEditor/Gruntfile.js')
-rw-r--r--www/wiki/extensions/CodeEditor/Gruntfile.js46
1 files changed, 46 insertions, 0 deletions
diff --git a/www/wiki/extensions/CodeEditor/Gruntfile.js b/www/wiki/extensions/CodeEditor/Gruntfile.js
new file mode 100644
index 00000000..df5bdd7f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/Gruntfile.js
@@ -0,0 +1,46 @@
+/*!
+ * Grunt file
+ *
+ * @package CodeEditor
+ */
+
+/* eslint-env node */
+
+module.exports = function ( grunt ) {
+ var conf = grunt.file.readJSON( 'extension.json' );
+ grunt.loadNpmTasks( 'grunt-banana-checker' );
+ grunt.loadNpmTasks( 'grunt-eslint' );
+ grunt.loadNpmTasks( 'grunt-stylelint' );
+ grunt.loadNpmTasks( 'grunt-jsonlint' );
+
+ grunt.initConfig( {
+ eslint: {
+ all: [
+ '**/*.js',
+ '!node_modules/**',
+ '!modules/ace/**',
+ '!vendor/**'
+ ]
+ },
+ stylelint: {
+ all: [
+ '**/*.css',
+ '**/*.less',
+ '!node_modules/**',
+ '!modules/ace/**',
+ '!vendor/**'
+ ]
+ },
+ banana: conf.MessagesDirs,
+ jsonlint: {
+ all: [
+ '**/*.json',
+ '!node_modules/**',
+ '!vendor/**'
+ ]
+ }
+ } );
+
+ grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
+ grunt.registerTask( 'default', 'test' );
+};