diff --git a/.eslintignore b/.eslintignore index 460e735a..25422889 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,3 +4,4 @@ vendor/ !/modules/default/** !/modules/node_helper !/modules/node_helper/** +!/modules/default/defaultmodules.js \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..f2852c10 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: node_js +node_js: + - "6" + - "5.1" + - "4" + - "0.12" + - "0.10" +before_script: + - npm install grunt-cli -g +script: grunt \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 00000000..ac499fe3 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,28 @@ +module.exports = function(grunt) { + require("time-grunt")(grunt); + grunt.initConfig({ + pkg: grunt.file.readJSON("package.json"), + eslint: { + options: { + configFile: ".eslintrc.json" + }, + target: ["js/*.js", "modules/default/*.js", "serveronly/*.js", "*.js"] + }, + postcss: { + lint: { + options: { + processors: [ + require("stylelint")({"extends": "stylelint-config-standard", "font-family-name-quotes": "double-where-recommended"}), + require("postcss-reporter")({ clearMessages: true }) + ] + }, + dist: { + src: "**/**/**/**/**/**/**/**.css" + } + } + } + }); + grunt.loadNpmTasks("grunt-eslint"); + grunt.loadNpmTasks("grunt-postcss"); + grunt.registerTask("default", ["eslint", "postcss:lint"]); +}; \ No newline at end of file diff --git a/package.json b/package.json index e815b2f1..d202526a 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,13 @@ "homepage": "https://github.com/MichMich/MagicMirror#readme", "devDependencies": { "electron-prebuilt": "latest", + "grunt": "latest", + "grunt-eslint": "latest", + "grunt-postcss": "latest", + "postcss-reporter": "latest", "stylelint": "latest", - "stylelint-config-standard": "latest" + "stylelint-config-standard": "latest", + "time-grunt": "latest" }, "dependencies": { "express": "latest", @@ -38,7 +43,7 @@ "iconv-lite": "latest", "moment": "latest", "request": "latest", - "snyk": "^1.13.2", + "snyk": "latest", "socket.io": "latest", "valid-url": "latest", "walk": "latest",