From dcc20fa9831f1571b418f69dce26f3950919c88c Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Thu, 4 Feb 2016 15:22:57 -0600 Subject: [PATCH] fix(generators): use mkdirp-no-bin When using npm link to develop against Ionic locally, most setups by default require the use of 'sudo', which then requires the gulp clean task to also be run with sudo. Switch to mkdirp-no-bin so there are no root owned files in dist/node_modules when using sudo npm link. --- package.json | 4 ++-- scripts/npm/package.json | 4 ++-- tooling/generator.js | 4 ++-- tooling/generators/pipe/index.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 4292b5b010..e3242bad99 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,10 @@ "inquirer": "0.11.0", "ionicons": "3.0.0-alpha.3", "lodash": "3.10.1", + "mkdirp-no-bin": "0.5.1", "q": "1.4.1", "reflect-metadata": "0.1.2", "rxjs": "5.0.0-beta.0", - "shelljs": "0.5.3", "zone.js": "0.5.10" }, "devDependencies": { @@ -88,4 +88,4 @@ "path": "node_modules/ionic-cz-conventional-changelog" } } -} \ No newline at end of file +} diff --git a/scripts/npm/package.json b/scripts/npm/package.json index ec7719fbcd..00424ed101 100644 --- a/scripts/npm/package.json +++ b/scripts/npm/package.json @@ -12,8 +12,8 @@ "colors": "^1.1.2", "inquirer": "0.11.0", "lodash": "3.10.1", - "q": "1.4.1", - "shelljs": "0.5.3" + "mkdirp-no-bin": "0.5.1", + "q": "1.4.1" }, "peerDependencies": { "angular2": "^<%= angularVersion %>" diff --git a/tooling/generator.js b/tooling/generator.js index c82b2af4c3..38c5028e45 100644 --- a/tooling/generator.js +++ b/tooling/generator.js @@ -1,7 +1,7 @@ var _ = require('lodash'), fs = require('fs'), path = require('path'), - shell = require('shelljs'); + mkdirp = require('mkdirp-no-bin'); module.exports = Generator; @@ -24,7 +24,7 @@ Generator.prototype.makeDirectories = function(){ if (!this.directory) { throw new Error('Generators must define their directory in their constructor.\nEx: \'pages\', \'components\', etc.'); } - shell.mkdir('-p', path.join(this.appDirectory, 'app', this.directory, this.fileName)); + mkdirp.sync(path.join(this.appDirectory, 'app', this.directory, this.fileName)); } Generator.prototype.renderTemplates = function renderTemplates() { diff --git a/tooling/generators/pipe/index.js b/tooling/generators/pipe/index.js index c5c56ccd0b..65a90350bf 100644 --- a/tooling/generators/pipe/index.js +++ b/tooling/generators/pipe/index.js @@ -1,7 +1,7 @@ var path = require('path'), fs = require('fs'), - shell = require('shelljs'), + mkdirp = require('mkdirp-no-bin'), Generator = require('../../generator'); module.exports = PipeGenerator; @@ -14,7 +14,7 @@ function PipeGenerator(options) { PipeGenerator.prototype = Object.create(Generator.prototype); PipeGenerator.prototype.makeDirectories = function(){ - shell.mkdir('-p', path.join(this.appDirectory, 'app', this.directory)); + mkdirp.sync(path.join(this.appDirectory, 'app', this.directory)); } PipeGenerator.prototype.renderTemplates = function renderTemplates() {