MagicMirror/Gruntfile.js

46 lines
1017 B
JavaScript
Raw Normal View History

2016-05-03 19:51:07 -04:00
module.exports = function(grunt) {
require("time-grunt")(grunt);
var fix = (grunt.option("env") || "lint") === "lint";
2016-05-03 19:51:07 -04:00
grunt.initConfig({
eslint: {
options: {
fix: fix,
2016-05-03 19:51:07 -04:00
configFile: ".eslintrc.json"
},
2017-04-03 10:37:23 +02:00
target: [
"js/*.js",
"modules/default/*.js",
"modules/default/*/*.js",
"serveronly/*.js",
2018-05-26 19:36:46 +01:00
"clientonly/*.js",
"*.js",
"tests/**/*.js",
"!modules/default/alert/notificationFx.js",
"!modules/default/alert/modernizr.custom.js",
"!modules/default/alert/classie.js",
"config/*",
"translations/translations.js",
"vendor/vendor.js"
]
2016-05-03 19:51:07 -04:00
},
2016-09-10 16:41:57 -04:00
jsonlint: {
main: {
2017-04-03 10:37:23 +02:00
src: [
"package.json",
".eslintrc.json",
".stylelintrc.json",
"translations/*.json",
"modules/default/*/translations/*.json",
"vendor/package.json"
2017-04-03 10:37:23 +02:00
],
2016-09-10 16:41:57 -04:00
options: {
reporter: "jshint"
}
}
2016-05-03 19:51:07 -04:00
}
});
grunt.loadNpmTasks("grunt-eslint");
2016-09-10 16:41:57 -04:00
grunt.loadNpmTasks("grunt-jsonlint");
grunt.registerTask("default", ["eslint", "jsonlint"]);
2016-12-01 19:15:28 -03:00
};