diff --git a/lib/command-actions/build.js b/lib/command-actions/build.js index 993af2c..f489c0a 100644 --- a/lib/command-actions/build.js +++ b/lib/command-actions/build.js @@ -6,7 +6,6 @@ const generalOptionsProcessing = require('./utils/general-options-processing'); const buildPromt = require('../promt/build-promt'); const tarsUtils = require('../utils'); const buildPromtOptions = require('../constants').BUILD; -const updatesDuringBuildProcess = require('./utils/updates-during-build-process'); function extractBuildOptionsFromPromt(answers) { let buildOptions = []; @@ -80,7 +79,6 @@ function buildInit(answers, commandOptions) { tarsUtils.tarsSay('You can use interactive mode via starting tars without any flags.'); } - updatesDuringBuildProcess(); tarsUtils.tarsSay('Please wait for a moment, while I\'m preparing builder for working...\n'); runCommand('gulp', buildOptions); } diff --git a/lib/command-actions/dev.js b/lib/command-actions/dev.js index 4a78b15..c839dc8 100644 --- a/lib/command-actions/dev.js +++ b/lib/command-actions/dev.js @@ -6,7 +6,6 @@ const generalOptionsProcessing = require('./utils/general-options-processing'); const devPromt = require('../promt/dev-promt'); const tarsUtils = require('../utils'); const devPromtOptions = require('../constants').DEV; -const updatesDuringBuildProcess = require('./utils/updates-during-build-process'); function extractBuildOptionsFromPromt(answers) { let buildOptions = []; @@ -82,7 +81,6 @@ function devInit(answers, commandOptions) { tarsUtils.tarsSay('You can use interactive mode via starting tars without any flags.'); } - updatesDuringBuildProcess(); tarsUtils.tarsSay('Please wait for a moment, while I\'m preparing builder for working...\n'); runCommand('gulp', buildOptions); } diff --git a/lib/command-actions/utils/updates-during-build-process.js b/lib/command-actions/utils/updates-during-build-process.js deleted file mode 100644 index 6e3d0f9..0000000 --- a/lib/command-actions/utils/updates-during-build-process.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -const fs = require('fs'); - -const tarsUtils = require('../../utils'); -const cwd = process.cwd(); - -module.exports = function updatesDuringBuildProcess() { - require('./update-project/update-babelrc')(); - - const eslintrcPath = cwd + '/.eslintrc'; - const tarsConfig = tarsUtils.getTarsConfig(); - let currentEslintConfigContent; - let newEslintConfig; - - try { - currentEslintConfigContent = fs.readFileSync(eslintrcPath); - } catch (error) { - currentEslintConfigContent = null; - } - - if (tarsConfig.useJsLintAndHint || (tarsConfig.js && tarsConfig.js.lint)) { - if (!currentEslintConfigContent) { - throw new Error('.eslintrc is not found! Please, add config for ESLint!'); - } else { - - const currentEslintConfig = JSON.parse( - currentEslintConfigContent.toString().replace(/\/\/[\s\w]+/gi, '') - ); - - if (!currentEslintConfig.parserOptions) { - newEslintConfig = require('./update-project/eslintrc-update')(currentEslintConfig); - fs.writeFileSync(eslintrcPath, JSON.stringify(newEslintConfig, null, 2)); - } - } - } -}; diff --git a/package.json b/package.json index 4fb6d63..356a0c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tars-cli", - "version": "1.10.3", + "version": "1.10.4", "engines": { "node": "^6.x.x" }, @@ -33,13 +33,13 @@ }, "license": "MIT", "dependencies": { - "@babel/core": "^7.1.2", + "@babel/core": "^7.1.5", "autoprefixer": "^8.2.0", "babel-loader": "^8.0.4", - "browser-sync": "^2.23.6", + "browser-sync": "^2.26.3", "chalk": "^1.1.3", "chokidar": "^2.0.3", - "cli-spinner": "^0.2.5", + "cli-spinner": "^0.2.8", "commander": "^2.15.1", "comment-json": "^1.1.3", "del": "2.2.2", @@ -93,16 +93,16 @@ "stream-combiner": "0.2.2", "stream-combiner2": "^1.1.1", "through2": "^2.0.3", - "webpack": "^4.21.0", + "webpack": "^4.25.1", "webpack-dev-middleware": "^3.4.0", "webpack-hot-middleware": "^2.24.3", "win-spawn": "^2.0.0" }, "devDependencies": { - "eslint": "^5.7.0" + "eslint": "^5.9.0" }, "optionalDependencies": { - "posix": "^4.1.1", + "posix": "^4.1.2", "fsevents": "^1.1.3" }, "bin": {