Skip to content

Commit dcc20fa

Browse files
committed
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.
1 parent 7d3d7f5 commit dcc20fa

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"inquirer": "0.11.0",
2121
"ionicons": "3.0.0-alpha.3",
2222
"lodash": "3.10.1",
23+
"mkdirp-no-bin": "0.5.1",
2324
"q": "1.4.1",
2425
"reflect-metadata": "0.1.2",
2526
"rxjs": "5.0.0-beta.0",
26-
"shelljs": "0.5.3",
2727
"zone.js": "0.5.10"
2828
},
2929
"devDependencies": {
@@ -88,4 +88,4 @@
8888
"path": "node_modules/ionic-cz-conventional-changelog"
8989
}
9090
}
91-
}
91+
}

scripts/npm/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"colors": "^1.1.2",
1313
"inquirer": "0.11.0",
1414
"lodash": "3.10.1",
15-
"q": "1.4.1",
16-
"shelljs": "0.5.3"
15+
"mkdirp-no-bin": "0.5.1",
16+
"q": "1.4.1"
1717
},
1818
"peerDependencies": {
1919
"angular2": "^<%= angularVersion %>"

tooling/generator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var _ = require('lodash'),
22
fs = require('fs'),
33
path = require('path'),
4-
shell = require('shelljs');
4+
mkdirp = require('mkdirp-no-bin');
55

66
module.exports = Generator;
77

@@ -24,7 +24,7 @@ Generator.prototype.makeDirectories = function(){
2424
if (!this.directory) {
2525
throw new Error('Generators must define their directory in their constructor.\nEx: \'pages\', \'components\', etc.');
2626
}
27-
shell.mkdir('-p', path.join(this.appDirectory, 'app', this.directory, this.fileName));
27+
mkdirp.sync(path.join(this.appDirectory, 'app', this.directory, this.fileName));
2828
}
2929

3030
Generator.prototype.renderTemplates = function renderTemplates() {

tooling/generators/pipe/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
var path = require('path'),
33
fs = require('fs'),
4-
shell = require('shelljs'),
4+
mkdirp = require('mkdirp-no-bin'),
55
Generator = require('../../generator');
66

77
module.exports = PipeGenerator;
@@ -14,7 +14,7 @@ function PipeGenerator(options) {
1414
PipeGenerator.prototype = Object.create(Generator.prototype);
1515

1616
PipeGenerator.prototype.makeDirectories = function(){
17-
shell.mkdir('-p', path.join(this.appDirectory, 'app', this.directory));
17+
mkdirp.sync(path.join(this.appDirectory, 'app', this.directory));
1818
}
1919

2020
PipeGenerator.prototype.renderTemplates = function renderTemplates() {

0 commit comments

Comments
 (0)