From 2a8abb2b6e655e5d503fcdba50180c763ae9a37a Mon Sep 17 00:00:00 2001 From: Vladimir Pikul Date: Mon, 5 Aug 2019 17:08:36 +0300 Subject: [PATCH 1/3] updated npm-jcn --- README.md | 4 +- modules/behavior.js | 58 +----------- modules/config.js | 22 ----- modules/questions.js | 106 +-------------------- modules/vendor.js | 173 ----------------------------------- spec/jasmine/BehaviorSpec.js | 107 ---------------------- spec/support/jasmine.json | 11 --- 7 files changed, 12 insertions(+), 469 deletions(-) delete mode 100644 modules/config.js delete mode 100644 modules/vendor.js delete mode 100644 spec/jasmine/BehaviorSpec.js delete mode 100644 spec/support/jasmine.json diff --git a/README.md b/README.md index 19e8ad7..ba1ac55 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Web Starter Kit](https://cloud.githubusercontent.com/assets/25930200/24800100/4fb5c49e-1ba7-11e7-982f-578699121d9b.png)](https://github.com/justcoded/npm-jcn/releases) +[![Web Starter Kit](https://user-images.githubusercontent.com/32138684/62466371-d3096b80-b799-11e9-8c96-2ae7d3173116.png)](https://github.com/justcoded/npm-jcn/releases) @@ -55,4 +55,4 @@ Contributions, questions and comments are all welcome and encouraged. For code c The MIT License (MIT) -Copyright (c) 2018 JustCoded the IP provided on other devices on your network \ No newline at end of file +Copyright (c) 2019 JustCoded the IP provided on other devices on your network \ No newline at end of file diff --git a/modules/behavior.js b/modules/behavior.js index 3904212..cce6726 100644 --- a/modules/behavior.js +++ b/modules/behavior.js @@ -13,10 +13,6 @@ if (noEmoji) { } let config = {}, - configClass = require('./config')({ - fs: fs, - del: del - }), git = require('./git')({ folderExists: folderExists, logComplete: logComplete, @@ -27,10 +23,6 @@ let config = {}, errorMessage: errorMessage, logComplete: logComplete, fs: fs - }), - vendor = require('./vendor')({ - errorMessage: errorMessage, - fs: fs }); /** @@ -114,11 +106,11 @@ function finish() { * @function * @param {Object} conf - Information about git repositary and paths to files to delete */ -function build(conf, isWPforPug) { +function build(conf) { return new Promise((resolve, reject) => { // define source path for WordPress projects or clean frontend projects (isWP_Path) - let isWP_Path = isWPforPug == 'WordPress-With-Pug' ? 'assets' : 'src'; + //let isWP_Path = isWPforPug == 'WordPress-With-Pug' ? 'assets' : 'src'; let chain = Promise.resolve(); @@ -143,20 +135,6 @@ function build(conf, isWPforPug) { // If not the first call read config file and configure package.json if (i !== 0) { chain = chain - .then(() => { - return new Promise((resolve, reject) => { - configClass.readConfigFile() - .then(res => { - config = res; - resolve(); - }).catch(e => { - errorMessage(e); - reject(); - }); - }); - }).catch(e => { - errorMessage(e); - }) .then(() => { return new Promise((resolve, reject) => { dependencies.configurePackageJson(config) @@ -167,32 +145,6 @@ function build(conf, isWPforPug) { }).catch(e => { errorMessage(e); }) - .then(() => { - return new Promise((resolve, reject) => { - vendor.changeVendor({ - config: config, - path: './'+isWP_Path+'/vendor_entries/vendor.scss', - addVendor: vendor.addVendorScss, - deleteVendor: vendor.deleteVendorScss - }) - .then(resolve); - }); - }).catch(e => { - errorMessage(e); - }) - .then(() => { - return new Promise((resolve, reject) => { - vendor.changeVendor({ - config: config, - path: './'+isWP_Path+'/vendor_entries/vendor.js', - addVendor: vendor.addVendorJs, - deleteVendor: vendor.deleteVendorJs - }) - .then(resolve); - }); - }).catch(e => { - errorMessage(e); - }); } // If the last call install node modules and run gulp @@ -218,9 +170,9 @@ function build(conf, isWPforPug) { * @param {Object} module.emoji - Emoji module */ module.exports = { - init: function (conf, isWPforPug) { + init: function (conf) { console.log('\nGetting starter files... ' + emoji.get('runner')); - build(conf, isWPforPug); + build(conf); }, emoji: emoji -} \ No newline at end of file +}; \ No newline at end of file diff --git a/modules/config.js b/modules/config.js deleted file mode 100644 index 17d4879..0000000 --- a/modules/config.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -module.exports = function (options) { - return { - /** - * Read config.json file and set it to global 'config' variable - * @function - */ - readConfigFile: function () { - return new Promise((resolve, reject) => { - try { - let config = JSON.parse(options.fs.readFileSync('./config.json', 'utf8')); - resolve(config); - return config; - } catch (e) { - console.log('No config file.'); - resolve(); - }; - }); - } - } -}; \ No newline at end of file diff --git a/modules/questions.js b/modules/questions.js index df2a0af..7e65c60 100644 --- a/modules/questions.js +++ b/modules/questions.js @@ -6,8 +6,6 @@ const behavior = require('./behavior'), defaultGit = 'https://github.com/justcoded/web-starter-kit.git'; let config = []; -let isWPforPug = ''; -let isWpGulp = ''; module.exports = () => { // Check the jcn version (currently doesn't work on Windows) @@ -43,7 +41,7 @@ module.exports = () => { }] }]; - + inquirer.prompt(questions).then(answers => { @@ -54,8 +52,6 @@ module.exports = () => { url: defaultGit, branch: 'master' // Gulp branch }); - - isWPforPug = 'With-Pug'; break; case 'WordPress': @@ -64,9 +60,6 @@ module.exports = () => { branch: 'WordPress-Gulp' // Gulp+WP branch }); - isWpGulp = 'WordPress-Gulp-'; - isWPforPug = 'WordPress-With-Pug'; - break; default: console.log('Something went wrong!'.red); @@ -79,99 +72,10 @@ module.exports = () => { projectType() .then(() => { - let questions = [{ - message: 'Would you like to use Pug?', - type: 'list', - name: 'value', - choices: [{ - name: 'Yes', - // With-Pug git branch - value: 'With-Pug' - }, { - name: 'No', - value: 'Markup-Gulp' - }], - }, - { - when: function (answers) { - if (answers.value === 'With-Pug') { - // Push the additional information to config - config.push({ - url: defaultGit, - branch: isWPforPug - }); - } - - return true; - }, - message: 'Would you like to use CSS Framework?', - type: 'list', - name: 'value', - choices: [{ - name: 'Yes', - value: 'CssFramework-Yes' - }, { - name: 'No', - value: 'CssFramework-No' - }], - }, - { - when: function (answers) { - return answers.value === 'CssFramework-No' ? true : false; - }, - // This question will appear only if user doesn't want to use CSS Frameworks - message: 'Would you like to use SCSS maps?', - type: 'list', - name: 'value', - choices: [{ - name: 'Yes', - value: 'default' - }, { - name: 'No', - value: 'Without-SCSS-Map' - }] - }, - { - when: function (answers) { - return answers.value === 'CssFramework-Yes' ? true : false; - }, - // This question will appear onlu if user wantsto use CSS Frameworks - message: 'Which Framework do you want to use?', - type: 'list', - name: 'value', - choices: [{ - name: 'Bootstrap', - // With-Bootstrap git branch - value: 'With-Bootstrap' - }, { - name: 'Materialize', - // With-Materialize git branch - value: 'With-Materialize' - }] - } - ]; - - inquirer.prompt(questions) - .then(answers => { - switch (answers.value) { - case 'Without-SCSS-Map': - case 'With-Bootstrap': - case 'With-Materialize': - // Push the additional information to config - config.push({ - url: defaultGit, - branch: isWpGulp + answers.value - }); - break; - } - - behavior.init(config, isWPforPug); - }) - .catch(e => { - console.log(e); - }); + behavior.init(config); }) .catch(e => { console.log(e); - });; -}; + }); + +}; \ No newline at end of file diff --git a/modules/vendor.js b/modules/vendor.js deleted file mode 100644 index 6f77b88..0000000 --- a/modules/vendor.js +++ /dev/null @@ -1,173 +0,0 @@ -'use strict'; - -module.exports = function (options) { - const fs = options.fs; - - return { - /** - * Read vendor file and execute callback - * @function - * @param {Object} settings - Information about vendor - * @param {string} settings.path - Path to vendor file - * @param {callback} settings.deleteVendor - Function wich deletes vendors - * @param {callback} settings.addVendor - Function wich adds vendors - */ - changeVendor: function (settings) { - return new Promise((resolve, reject) => { - let vendor; - - if (typeof settings.config === 'undefined') { - return resolve(); - } - - try { - vendor = fs.readFileSync(settings.path, 'utf8').toString().split('\n'); - } catch (e) { - options.errorMessage(e); - return reject(); - } - - settings.addVendor(vendor, settings.path, settings.config) - .then(settings.deleteVendor.bind(null, vendor, settings.path, settings.config)) - .then(resolve); - }); - }, - /** - * Add vendors to scss vendor file - * @function - * @param {Object} vendorScss - Content of the scss vendor file - * @param {string} path - Path to scss vendor file - */ - addVendorScss: function (vendorScss, path, config) { - return new Promise((resolve, reject) => { - if (typeof config.add.vendorScss === 'undefined') { - return resolve(); - } else { - for (let item of config.add.vendorScss) { - vendorScss.push(item); - } - for (let i = 0; i < vendorScss.length; i++) { - vendorScss[i] += '\n'; - } - - try { - fs.writeFileSync(path, vendorScss.join().replace(/,/g, ''), 'utf8'); - resolve(); - } catch (e) { - options.errorMessage(e); - reject(); - } - } - }); - }, - /** - * Delete vendors from scss vendor file - * @function - * @param {Object} vendorScss - Content of the scss vendor file - * @param {string} path - Path to scss vendor file - */ - deleteVendorScss: function (vendorScss, path, config) { - return new Promise((resolve, reject) => { - if (typeof config.delete.vendorScss === 'undefined') { - return resolve(); - } else { - for (let item of config.delete.vendorScss) { - let index; - - for (let i of vendorScss) { - index = vendorScss.indexOf(item + '\n'); - - if (index < 0) { - index = vendorScss.indexOf(item); - } - - if (index > 1) { - vendorScss.splice(index, 1); - } - } - } - try { - fs.writeFileSync(path, vendorScss.join().replace(/,/g, ''), 'utf8'); - resolve(); - } catch (e) { - options.errorMessage(e); - reject(); - } - } - }); - }, - /** - * Add vendors to js vendors file - * @function - * @param {Object} vendorJs - Content of the js vendor file - * @param {string} path - Path to js vendor file - */ - addVendorJs: function (vendorJs, path, config) { - return new Promise((resolve, reject) => { - if (typeof config.add.vendorJs === 'undefined') { - resolve(); - } else { - let copyVendorJs = vendorJs.slice(); - for (let item of config.add.vendorJs) { - copyVendorJs.splice(copyVendorJs.length - 1, 0, ` '${item}'`); - } - for (let i = 0; i < copyVendorJs.length; i++) { - if (copyVendorJs[i].indexOf('.js\'') > 0) { - copyVendorJs[i] += '|'; - } - copyVendorJs[i] += '\n'; - } - try { - vendorJs = copyVendorJs.join().replace(/,/g, '').replace(/\|/g, ','); - fs.writeFileSync(path, vendorJs, 'utf8'); - resolve(); - } catch (e) { - options.errorMessage(e); - reject(); - } - - resolve(); - } - }); - }, - /** - * Delete vendors from js vendors file - * @function - * @param {Object} vendorJs - Content of the js vendor file - * @param {string} path - Path to js vendor file - */ - deleteVendorJs: function (vendorJs, path, config) { - return new Promise((resolve, reject) => { - if (typeof config.delete.vendorJs === 'undefined') { - resolve(); - } else { - vendorJs = vendorJs.split('\n'); - for (let item of config.delete.vendorJs) { - for (let i = 0; i < vendorJs.length; i++) { - let index = vendorJs[i].replace(/'|\s/g, '').indexOf(item); - if (index !== -1) { - vendorJs.splice(i, 1); - } - } - } - for (let i = 0; i < vendorJs.length; i++) { - if (vendorJs[i].indexOf('.js\'') > 0) { - vendorJs[i] += '|'; - } - vendorJs[i] += '\n'; - } - - try { - vendorJs = vendorJs.join().replace(/,/g, '').replace(/\|/g, ','); - fs.writeFileSync(path, vendorJs, 'utf8'); - resolve(); - } catch (e) { - options.errorMessage(e); - reject(); - } - resolve(); - } - }); - } - } -}; \ No newline at end of file diff --git a/spec/jasmine/BehaviorSpec.js b/spec/jasmine/BehaviorSpec.js deleted file mode 100644 index f0f3a40..0000000 --- a/spec/jasmine/BehaviorSpec.js +++ /dev/null @@ -1,107 +0,0 @@ -var config = { - "delete": { - "dependencies": [ - "normalize.css" - ], - "vendorScss": [ - "@import '../../node_modules/normalize.css/normalize';" - ] - }, - "add": { - "dependencies": { - "jquery": "~2.2.4", - "bootstrap-sass": "^3.3.7" - }, - "vendorJs": [ - "./node_modules/bootstrap-sass/assets/javascripts/bootstrap.min.js" - ], - "vendorScss": [ - "@import '../scss/abstracts/_bootstrap-variables.scss';", - "@import '../../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';" - ] - } -}; - -describe('Dependencies', function () { - it('should be executed without errors', function (done) { - // JSON.parse = arg => arg; - var dependencies = require('../../modules/dependencies')({ - errorMessage: e => console.log(e), - logComplete: str => console.log(str), - fs: { - readFileSync: () => { - return "{\"name\":\"web-starter-jc\",\"version\":\"1.0.0\",\"description\":\"Starter kit for markup projects\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/justcoded/web-starter-kit\"},\"keywords\":[\"starter\",\"markup\",\"JustCoded\",\"jc\"],\"author\":\"JustCoded\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/justcoded/web-starter-kit/issues\"},\"homepage\":\"https://github.com/justcoded/web-starter-kit\",\"devDependencies\":{\"babel-preset-es2015\":\"^6.24.0\",\"babelify\":\"^7.3.0\",\"browser-sync\":\"^2.18.0\",\"browserify\":\"^14.0.0\",\"del\":\"^2.2.2\",\"files-exist\":\"^1.0.2\",\"gulp\":\"^3.9.1\",\"gulp-autoprefixer\":\"^3.1.1\",\"gulp-concat\":\"^2.6.1\",\"gulp-cssimport\":\"^5.0.0\",\"gulp-cssnano\":\"^2.1.2\",\"gulp-debug\":\"^3.1.0\",\"gulp-group-css-media-queries\":\"^1.2.0\",\"gulp-htmlhint\":\"^0.3.1\",\"gulp-imagemin\":\"^3.1.1\",\"gulp-jshint\":\"^2.0.4\",\"gulp-newer\":\"^1.3.0\",\"gulp-notify\":\"^3.0.0\",\"gulp-rename\":\"^1.2.2\",\"gulp-sass\":\"^3.1.0\",\"gulp-sourcemaps\":\"^2.4.1\",\"gulp-uglify\":\"^2.1.0\",\"gulp-util\":\"^3.0.8\",\"gulp-watch\":\"^4.3.11\",\"htmlhint-stylish\":\"^1.0.3\",\"imagemin-pngquant\":\"^5.0.0\",\"jshint\":\"^2.9.4\",\"node-notifier\":\"^5.0.2\",\"path\":\"^0.12.7\",\"run-sequence\":\"^1.2.2\",\"vinyl-buffer\":\"^1.0.0\",\"vinyl-source-stream\":\"^1.1.0\"},\"engines\":{\"node\":\">=4.0.0\"},\"scripts\":{\"test\":\"gulp production\",\"start\":\"gulp\"},\"dependencies\":{\"include-media\":\"~1.4.9\",\"jquery\":\"~2.2.4\",\"normalize.css\":\"~5.0.0\"}}"; - }, - writeFileSync: () => {} - } - }); - dependencies.configurePackageJson(config) - .then(() => { - done(); - }); - }) -}) - -describe('Vendors', function () { - describe('Scss', function () { - var vendor = require('../../modules/vendor')({ - errorMessage: e => console.log(e), - fs: { - readFileSync: () => { - return [ - "// All imports in this file will be compiled into vendors.css file.", - "//", - "// Note: You can import SCSS and CSS files as well.", - "", - "@import '../../node_modules/normalize.css/normalize';" - ]; - }, - writeFileSync: (path, value) => value - } - }); - - it('should be executed without errors', function (done) { - vendor.changeVendor({ - config: config, - path: '', - addVendor: vendor.addVendorScss, - deleteVendor: vendor.deleteVendorScss - }) - .then(() => { - done(); - }); - }); - }); - - describe('JS', function () { - var vendor = require('../../modules/vendor')({ - errorMessage: e => console.log(e), - fs: { - readFileSync: () => { - return [ - "// All imports in this file will be compiled into vendors.js file.", - "//", - "// Note: ES6 support for these imports is not supported in base build", - "", - "module.exports = [", - " './node_modules/jquery/dist/jquery.js'", - "];" - ]; - }, - writeFileSync: () => {} - } - }); - - it('should be executed without errors', function (done) { - vendor.changeVendor({ - config: config, - path: '', - addVendor: vendor.addVendorJs, - deleteVendor: vendor.deleteVendorJs - }) - .then(() => { - done(); - }); - }); - }); -}); \ No newline at end of file diff --git a/spec/support/jasmine.json b/spec/support/jasmine.json deleted file mode 100644 index 3ea3166..0000000 --- a/spec/support/jasmine.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "spec_dir": "spec", - "spec_files": [ - "**/*[sS]pec.js" - ], - "helpers": [ - "helpers/**/*.js" - ], - "stopSpecOnExpectationFailure": false, - "random": false -} From 32745e5caef8013b17628d55c34d3bb22fa8433c Mon Sep 17 00:00:00 2001 From: Vladimir Pikul Date: Mon, 5 Aug 2019 17:54:51 +0300 Subject: [PATCH 2/3] test returned --- spec/jasmine/BehaviorSpec.js | 107 +++++++++++++++++++++++++++++++++++ spec/support/jasmine.json | 11 ++++ 2 files changed, 118 insertions(+) create mode 100644 spec/jasmine/BehaviorSpec.js create mode 100644 spec/support/jasmine.json diff --git a/spec/jasmine/BehaviorSpec.js b/spec/jasmine/BehaviorSpec.js new file mode 100644 index 0000000..f0f3a40 --- /dev/null +++ b/spec/jasmine/BehaviorSpec.js @@ -0,0 +1,107 @@ +var config = { + "delete": { + "dependencies": [ + "normalize.css" + ], + "vendorScss": [ + "@import '../../node_modules/normalize.css/normalize';" + ] + }, + "add": { + "dependencies": { + "jquery": "~2.2.4", + "bootstrap-sass": "^3.3.7" + }, + "vendorJs": [ + "./node_modules/bootstrap-sass/assets/javascripts/bootstrap.min.js" + ], + "vendorScss": [ + "@import '../scss/abstracts/_bootstrap-variables.scss';", + "@import '../../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';" + ] + } +}; + +describe('Dependencies', function () { + it('should be executed without errors', function (done) { + // JSON.parse = arg => arg; + var dependencies = require('../../modules/dependencies')({ + errorMessage: e => console.log(e), + logComplete: str => console.log(str), + fs: { + readFileSync: () => { + return "{\"name\":\"web-starter-jc\",\"version\":\"1.0.0\",\"description\":\"Starter kit for markup projects\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/justcoded/web-starter-kit\"},\"keywords\":[\"starter\",\"markup\",\"JustCoded\",\"jc\"],\"author\":\"JustCoded\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/justcoded/web-starter-kit/issues\"},\"homepage\":\"https://github.com/justcoded/web-starter-kit\",\"devDependencies\":{\"babel-preset-es2015\":\"^6.24.0\",\"babelify\":\"^7.3.0\",\"browser-sync\":\"^2.18.0\",\"browserify\":\"^14.0.0\",\"del\":\"^2.2.2\",\"files-exist\":\"^1.0.2\",\"gulp\":\"^3.9.1\",\"gulp-autoprefixer\":\"^3.1.1\",\"gulp-concat\":\"^2.6.1\",\"gulp-cssimport\":\"^5.0.0\",\"gulp-cssnano\":\"^2.1.2\",\"gulp-debug\":\"^3.1.0\",\"gulp-group-css-media-queries\":\"^1.2.0\",\"gulp-htmlhint\":\"^0.3.1\",\"gulp-imagemin\":\"^3.1.1\",\"gulp-jshint\":\"^2.0.4\",\"gulp-newer\":\"^1.3.0\",\"gulp-notify\":\"^3.0.0\",\"gulp-rename\":\"^1.2.2\",\"gulp-sass\":\"^3.1.0\",\"gulp-sourcemaps\":\"^2.4.1\",\"gulp-uglify\":\"^2.1.0\",\"gulp-util\":\"^3.0.8\",\"gulp-watch\":\"^4.3.11\",\"htmlhint-stylish\":\"^1.0.3\",\"imagemin-pngquant\":\"^5.0.0\",\"jshint\":\"^2.9.4\",\"node-notifier\":\"^5.0.2\",\"path\":\"^0.12.7\",\"run-sequence\":\"^1.2.2\",\"vinyl-buffer\":\"^1.0.0\",\"vinyl-source-stream\":\"^1.1.0\"},\"engines\":{\"node\":\">=4.0.0\"},\"scripts\":{\"test\":\"gulp production\",\"start\":\"gulp\"},\"dependencies\":{\"include-media\":\"~1.4.9\",\"jquery\":\"~2.2.4\",\"normalize.css\":\"~5.0.0\"}}"; + }, + writeFileSync: () => {} + } + }); + dependencies.configurePackageJson(config) + .then(() => { + done(); + }); + }) +}) + +describe('Vendors', function () { + describe('Scss', function () { + var vendor = require('../../modules/vendor')({ + errorMessage: e => console.log(e), + fs: { + readFileSync: () => { + return [ + "// All imports in this file will be compiled into vendors.css file.", + "//", + "// Note: You can import SCSS and CSS files as well.", + "", + "@import '../../node_modules/normalize.css/normalize';" + ]; + }, + writeFileSync: (path, value) => value + } + }); + + it('should be executed without errors', function (done) { + vendor.changeVendor({ + config: config, + path: '', + addVendor: vendor.addVendorScss, + deleteVendor: vendor.deleteVendorScss + }) + .then(() => { + done(); + }); + }); + }); + + describe('JS', function () { + var vendor = require('../../modules/vendor')({ + errorMessage: e => console.log(e), + fs: { + readFileSync: () => { + return [ + "// All imports in this file will be compiled into vendors.js file.", + "//", + "// Note: ES6 support for these imports is not supported in base build", + "", + "module.exports = [", + " './node_modules/jquery/dist/jquery.js'", + "];" + ]; + }, + writeFileSync: () => {} + } + }); + + it('should be executed without errors', function (done) { + vendor.changeVendor({ + config: config, + path: '', + addVendor: vendor.addVendorJs, + deleteVendor: vendor.deleteVendorJs + }) + .then(() => { + done(); + }); + }); + }); +}); \ No newline at end of file diff --git a/spec/support/jasmine.json b/spec/support/jasmine.json new file mode 100644 index 0000000..3ea3166 --- /dev/null +++ b/spec/support/jasmine.json @@ -0,0 +1,11 @@ +{ + "spec_dir": "spec", + "spec_files": [ + "**/*[sS]pec.js" + ], + "helpers": [ + "helpers/**/*.js" + ], + "stopSpecOnExpectationFailure": false, + "random": false +} From 915a4287fd84b78019b04753852fbae68e5a3fac Mon Sep 17 00:00:00 2001 From: Vladimir Pikul Date: Tue, 6 Aug 2019 10:34:04 +0300 Subject: [PATCH 3/3] jasmine test returned --- modules/behavior.js | 13 +- modules/vendor.js | 173 ++++++++++++++++ package-lock.json | 486 -------------------------------------------- 3 files changed, 179 insertions(+), 493 deletions(-) create mode 100644 modules/vendor.js delete mode 100644 package-lock.json diff --git a/modules/behavior.js b/modules/behavior.js index cce6726..02325ed 100644 --- a/modules/behavior.js +++ b/modules/behavior.js @@ -1,12 +1,12 @@ 'use strict'; const colors = require('colors'), - shell = require('shelljs/global'), - fs = require('fs'), - emoji = require('node-emoji'), - del = require('del'), - copydir = require('copy-dir'), - noEmoji = /^win/.test(process.platform); + shell = require('shelljs/global'), + fs = require('fs'), + emoji = require('node-emoji'), + del = require('del'), + copydir = require('copy-dir'), + noEmoji = /^win/.test(process.platform); if (noEmoji) { emoji.get = () => ''; @@ -110,7 +110,6 @@ function build(conf) { return new Promise((resolve, reject) => { // define source path for WordPress projects or clean frontend projects (isWP_Path) - //let isWP_Path = isWPforPug == 'WordPress-With-Pug' ? 'assets' : 'src'; let chain = Promise.resolve(); diff --git a/modules/vendor.js b/modules/vendor.js new file mode 100644 index 0000000..6f77b88 --- /dev/null +++ b/modules/vendor.js @@ -0,0 +1,173 @@ +'use strict'; + +module.exports = function (options) { + const fs = options.fs; + + return { + /** + * Read vendor file and execute callback + * @function + * @param {Object} settings - Information about vendor + * @param {string} settings.path - Path to vendor file + * @param {callback} settings.deleteVendor - Function wich deletes vendors + * @param {callback} settings.addVendor - Function wich adds vendors + */ + changeVendor: function (settings) { + return new Promise((resolve, reject) => { + let vendor; + + if (typeof settings.config === 'undefined') { + return resolve(); + } + + try { + vendor = fs.readFileSync(settings.path, 'utf8').toString().split('\n'); + } catch (e) { + options.errorMessage(e); + return reject(); + } + + settings.addVendor(vendor, settings.path, settings.config) + .then(settings.deleteVendor.bind(null, vendor, settings.path, settings.config)) + .then(resolve); + }); + }, + /** + * Add vendors to scss vendor file + * @function + * @param {Object} vendorScss - Content of the scss vendor file + * @param {string} path - Path to scss vendor file + */ + addVendorScss: function (vendorScss, path, config) { + return new Promise((resolve, reject) => { + if (typeof config.add.vendorScss === 'undefined') { + return resolve(); + } else { + for (let item of config.add.vendorScss) { + vendorScss.push(item); + } + for (let i = 0; i < vendorScss.length; i++) { + vendorScss[i] += '\n'; + } + + try { + fs.writeFileSync(path, vendorScss.join().replace(/,/g, ''), 'utf8'); + resolve(); + } catch (e) { + options.errorMessage(e); + reject(); + } + } + }); + }, + /** + * Delete vendors from scss vendor file + * @function + * @param {Object} vendorScss - Content of the scss vendor file + * @param {string} path - Path to scss vendor file + */ + deleteVendorScss: function (vendorScss, path, config) { + return new Promise((resolve, reject) => { + if (typeof config.delete.vendorScss === 'undefined') { + return resolve(); + } else { + for (let item of config.delete.vendorScss) { + let index; + + for (let i of vendorScss) { + index = vendorScss.indexOf(item + '\n'); + + if (index < 0) { + index = vendorScss.indexOf(item); + } + + if (index > 1) { + vendorScss.splice(index, 1); + } + } + } + try { + fs.writeFileSync(path, vendorScss.join().replace(/,/g, ''), 'utf8'); + resolve(); + } catch (e) { + options.errorMessage(e); + reject(); + } + } + }); + }, + /** + * Add vendors to js vendors file + * @function + * @param {Object} vendorJs - Content of the js vendor file + * @param {string} path - Path to js vendor file + */ + addVendorJs: function (vendorJs, path, config) { + return new Promise((resolve, reject) => { + if (typeof config.add.vendorJs === 'undefined') { + resolve(); + } else { + let copyVendorJs = vendorJs.slice(); + for (let item of config.add.vendorJs) { + copyVendorJs.splice(copyVendorJs.length - 1, 0, ` '${item}'`); + } + for (let i = 0; i < copyVendorJs.length; i++) { + if (copyVendorJs[i].indexOf('.js\'') > 0) { + copyVendorJs[i] += '|'; + } + copyVendorJs[i] += '\n'; + } + try { + vendorJs = copyVendorJs.join().replace(/,/g, '').replace(/\|/g, ','); + fs.writeFileSync(path, vendorJs, 'utf8'); + resolve(); + } catch (e) { + options.errorMessage(e); + reject(); + } + + resolve(); + } + }); + }, + /** + * Delete vendors from js vendors file + * @function + * @param {Object} vendorJs - Content of the js vendor file + * @param {string} path - Path to js vendor file + */ + deleteVendorJs: function (vendorJs, path, config) { + return new Promise((resolve, reject) => { + if (typeof config.delete.vendorJs === 'undefined') { + resolve(); + } else { + vendorJs = vendorJs.split('\n'); + for (let item of config.delete.vendorJs) { + for (let i = 0; i < vendorJs.length; i++) { + let index = vendorJs[i].replace(/'|\s/g, '').indexOf(item); + if (index !== -1) { + vendorJs.splice(i, 1); + } + } + } + for (let i = 0; i < vendorJs.length; i++) { + if (vendorJs[i].indexOf('.js\'') > 0) { + vendorJs[i] += '|'; + } + vendorJs[i] += '\n'; + } + + try { + vendorJs = vendorJs.join().replace(/,/g, '').replace(/\|/g, ','); + fs.writeFileSync(path, vendorJs, 'utf8'); + resolve(); + } catch (e) { + options.errorMessage(e); + reject(); + } + resolve(); + } + }); + } + } +}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 09fba3a..0000000 --- a/package-lock.json +++ /dev/null @@ -1,486 +0,0 @@ -{ - "name": "jcn", - "version": "1.8.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "ansi-escapes": { - "version": "3.1.0", - "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==" - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "1.9.3" - } - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "1.0.3" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.5.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "requires": { - "restore-cursor": "2.0.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "colors": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", - "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "copy-dir": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/copy-dir/-/copy-dir-0.3.0.tgz", - "integrity": "sha1-3rLcL6nJKQ7UfIQVWpmabUX1o1g=", - "requires": { - "mkdir-p": "0.0.7" - } - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.1", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "external-editor": { - "version": "2.2.0", - "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.24", - "tmp": "0.0.33" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "requires": { - "escape-string-regexp": "1.0.5" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "globby": { - "version": "5.0.0", - "resolved": "http://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.3", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": "2.1.2" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "requires": { - "ansi-escapes": "3.1.0", - "chalk": "2.4.1", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.2.0", - "figures": "2.0.0", - "lodash": "4.17.11", - "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" - } - }, - "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "requires": { - "is-path-inside": "1.0.1" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "requires": { - "path-is-inside": "1.0.2" - } - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" - }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" - }, - "lodash.toarray": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", - "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=" - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.11" - } - }, - "mkdir-p": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mkdir-p/-/mkdir-p-0.0.7.tgz", - "integrity": "sha1-JMXb4m2jqZ7xWKHu+aXC3Z3laDw=" - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, - "node-emoji": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.8.1.tgz", - "integrity": "sha512-+ktMAh1Jwas+TnGodfCfjUbJKoANqPaJFN0z0iqh41eqD8dvguNzcitVSBSVK1pidz0AqGbLKcoVuVLRVZ/aVg==", - "requires": { - "lodash.toarray": "4.4.0" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "1.2.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" - }, - "pify": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "2.0.4" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "requires": { - "resolve": "1.8.1" - } - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "requires": { - "path-parse": "1.0.6" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.3" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "requires": { - "is-promise": "2.1.0" - } - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=" - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "requires": { - "rx-lite": "4.0.8" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "shelljs": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", - "requires": { - "glob": "7.1.3", - "interpret": "1.1.0", - "rechoir": "0.6.2" - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "3.0.0" - } - }, - "through": { - "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - } - } -}