Authored by ccbikai(👎🏻🍜)

stylelint support cache

@@ -147,6 +147,7 @@ public/build/dist/* @@ -147,6 +147,7 @@ public/build/dist/*
147 public/css/* 147 public/css/*
148 public/bundle/* 148 public/bundle/*
149 .eslintcache 149 .eslintcache
  150 +.stylelintcache
150 *.log.* 151 *.log.*
151 nbproject/* 152 nbproject/*
152 .DS_Store 153 .DS_Store
@@ -17,5 +17,5 @@ jsfiles.forEach(function(filepath) { @@ -17,5 +17,5 @@ jsfiles.forEach(function(filepath) {
17 17
18 cssfiles.forEach(function(filepath) { 18 cssfiles.forEach(function(filepath) {
19 console.log(`CSS ${filepath} 检查结果:`); 19 console.log(`CSS ${filepath} 检查结果:`);
20 - shelljs.exec(`${lintPath.css}${ext} --syntax scss --config .stylelintrc --custom-formatter ./node_modules/stylelint-formatter-table/index.js "${filepath}"`); // eslint-disable-line 20 + shelljs.exec(`${lintPath.css}${ext} --syntax scss --cache --config .stylelintrc --custom-formatter ./node_modules/stylelint-formatter-table/index.js "${filepath}"`); // eslint-disable-line
21 }); 21 });
@@ -14,9 +14,9 @@ @@ -14,9 +14,9 @@
14 "build": "webpack --config ./public/build/webpack.prod.config.js", 14 "build": "webpack --config ./public/build/webpack.prod.config.js",
15 "debug": "DEBUG=\"express:*\" nodemon -e js,hbs -i public/ app.js", 15 "debug": "DEBUG=\"express:*\" nodemon -e js,hbs -i public/ app.js",
16 "lint-js": "eslint -c .eslintrc --cache .", 16 "lint-js": "eslint -c .eslintrc --cache .",
17 - "lint-css": "stylelint --syntax scss --config .stylelintrc 'public/scss/**/*.css'", 17 + "lint-css": "stylelint --syntax scss --cache --config .stylelintrc 'public/scss/**/*.css'",
18 "lint-vue-js": "eslint -c .eslintrc --cache public/vue", 18 "lint-vue-js": "eslint -c .eslintrc --cache public/vue",
19 - "lint-vue-css": "stylelint --syntax scss --extract --config .stylelintrc 'public/scss/**/*.vue'", 19 + "lint-vue-css": "stylelint --syntax scss --extract --cache --config .stylelintrc 'public/scss/**/*.vue'",
20 "lint-all": "node lint-all.js", 20 "lint-all": "node lint-all.js",
21 "precommit": "node lint-commit.js" 21 "precommit": "node lint-commit.js"
22 }, 22 },