Skip to content

Commit

Permalink
fix(generators): use mkdirp-no-bin
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tlancina committed Feb 4, 2016
1 parent 7d3d7f5 commit dcc20fa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -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": {
Expand Down Expand Up @@ -88,4 +88,4 @@
"path": "node_modules/ionic-cz-conventional-changelog"
}
}
}
}
4 changes: 2 additions & 2 deletions scripts/npm/package.json
Expand Up @@ -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 %>"
Expand Down
4 changes: 2 additions & 2 deletions 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;

Expand All @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions 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;
Expand All @@ -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() {
Expand Down

0 comments on commit dcc20fa

Please sign in to comment.