From 711a57e352e2bd2a73e446aed29fe6055ecde7fc Mon Sep 17 00:00:00 2001 From: yana-coderiver Date: Sun, 26 May 2019 22:53:14 +0300 Subject: [PATCH 1/4] Remove dublicates in package.json --- generators/app/templates/package.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/generators/app/templates/package.json b/generators/app/templates/package.json index 201c8fb5..5cf3cddf 100644 --- a/generators/app/templates/package.json +++ b/generators/app/templates/package.json @@ -46,7 +46,6 @@ "gulp-git": "^2.9.0", "lost": "^8.3.1", "postcss-csso": "^3.0.0", - "babel-eslint": "^7.2.3", "gulp-postcss": "^8.0.0",<% if (css === 'postcss') { %> "gulp-sass-to-postcss-mixins": "0.0.3", "postcss": "^8.0.0", @@ -82,10 +81,8 @@ "gulp-cheerio": "^0.6.3", "gulp-changed": "^3.2.0", "gulp-svgstore": "^7.0.1", - "through2": "^3.0.1", - "gulp-consolidate": "^0.2.0",<% } %><% if (svgo) { %> + "through2": "^3.0.1",<% } %><% if (svgo) { %> "gulp-svgmin": "^1.2.0",<% } %><% if (templates) { %> - "gulp-changed": "^1.3.0", "gulp-front-matter": "^1.3.0", "gulp-prettify": "^0.5.0",<% } %><% if (templates === 'nunjucks') { %> "gulp-nunjucks-render": "^2.2.2",<% } %><% if (templates === 'swig') { %> @@ -98,7 +95,6 @@ "webpack-cli": "^3.3.0", "glslify-loader": "^2.0.0", "raw-loader": "^1.0.0", - "babel-runtime": "^5.0.0", "require-yaml": "^0.0.1", "lodash": "^4.17.11" } From a2bf302f3ffeac347b719c894532258e9ac82582 Mon Sep 17 00:00:00 2001 From: yana-coderiver Date: Sun, 26 May 2019 23:08:15 +0300 Subject: [PATCH 2/4] Eslint ignore file --- generators/app/templates/eslintignore | 1 + generators/app/writing.js | 1 + 2 files changed, 2 insertions(+) create mode 100644 generators/app/templates/eslintignore diff --git a/generators/app/templates/eslintignore b/generators/app/templates/eslintignore new file mode 100644 index 00000000..c32bf3bf --- /dev/null +++ b/generators/app/templates/eslintignore @@ -0,0 +1 @@ +src/js/lib \ No newline at end of file diff --git a/generators/app/writing.js b/generators/app/writing.js index 206f1498..6befd998 100644 --- a/generators/app/writing.js +++ b/generators/app/writing.js @@ -24,6 +24,7 @@ module.exports = function () { this.fs.copy(this.templatePath('gitignore'), '.gitignore'); this.fs.copy(this.templatePath('editorconfig'), '.editorconfig'); this.fs.copy(this.templatePath('eslintrc'), '.eslintrc'); + this.fs.copy(this.templatePath('eslintignore'), '.eslintignore'); this.fs.copy(this.templatePath('htmlhintrc'), '.htmlhintrc'); this.fs.copy(this.templatePath('sass-lint.yml'), '.sass-lint.yml'); this.fs.copy(this.templatePath('stylelintrc'), '.stylelintrc'); From 8c1e82feb651304bdc1f661463c10b42e2d0e556 Mon Sep 17 00:00:00 2001 From: yana-coderiver Date: Sun, 26 May 2019 23:17:35 +0300 Subject: [PATCH 3/4] Update eslint config --- generators/app/templates/eslintrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generators/app/templates/eslintrc b/generators/app/templates/eslintrc index fb69a771..cbe31a1e 100644 --- a/generators/app/templates/eslintrc +++ b/generators/app/templates/eslintrc @@ -11,6 +11,7 @@ "extends": ["airbnb-base", "prettier"], "rules": { "dollar-sign/dollar-sign": [2, "ignoreProperties"], - "no-plusplus": ["error", { "allowForLoopAfterthoughts": true }] + "no-plusplus": ["error", { "allowForLoopAfterthoughts": true }], + "no-unused-vars": 1 } } From c4b23f3efb625fc17b225208d4bc0a4c71dd3e08 Mon Sep 17 00:00:00 2001 From: yana-coderiver Date: Sun, 26 May 2019 23:59:23 +0300 Subject: [PATCH 4/4] Hot fix for production js --- generators/app/templates/gulp/config.js | 2 +- generators/app/templates/webpack.config.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/generators/app/templates/gulp/config.js b/generators/app/templates/gulp/config.js index efaa506d..cf1a4407 100644 --- a/generators/app/templates/gulp/config.js +++ b/generators/app/templates/gulp/config.js @@ -1,6 +1,6 @@ import util from 'gulp-util'; -const production = util.env.production || util.env.prod || false; +const production = util.env.production || util.env.prod || util.env._.indexOf('build') !== -1 || false; const destPath = 'build'; const config = { diff --git a/generators/app/templates/webpack.config.js b/generators/app/templates/webpack.config.js index 47ef15f1..7efcfac7 100644 --- a/generators/app/templates/webpack.config.js +++ b/generators/app/templates/webpack.config.js @@ -1,6 +1,5 @@ const webpack = require('webpack'); const path = require('path'); -const util = require('gulp-util'); const config = require('./gulp/config'); const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;