mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
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.
This commit is contained in:
@ -20,10 +20,10 @@
|
|||||||
"inquirer": "0.11.0",
|
"inquirer": "0.11.0",
|
||||||
"ionicons": "3.0.0-alpha.3",
|
"ionicons": "3.0.0-alpha.3",
|
||||||
"lodash": "3.10.1",
|
"lodash": "3.10.1",
|
||||||
|
"mkdirp-no-bin": "0.5.1",
|
||||||
"q": "1.4.1",
|
"q": "1.4.1",
|
||||||
"reflect-metadata": "0.1.2",
|
"reflect-metadata": "0.1.2",
|
||||||
"rxjs": "5.0.0-beta.0",
|
"rxjs": "5.0.0-beta.0",
|
||||||
"shelljs": "0.5.3",
|
|
||||||
"zone.js": "0.5.10"
|
"zone.js": "0.5.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
"colors": "^1.1.2",
|
"colors": "^1.1.2",
|
||||||
"inquirer": "0.11.0",
|
"inquirer": "0.11.0",
|
||||||
"lodash": "3.10.1",
|
"lodash": "3.10.1",
|
||||||
"q": "1.4.1",
|
"mkdirp-no-bin": "0.5.1",
|
||||||
"shelljs": "0.5.3"
|
"q": "1.4.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"angular2": "^<%= angularVersion %>"
|
"angular2": "^<%= angularVersion %>"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
var _ = require('lodash'),
|
var _ = require('lodash'),
|
||||||
fs = require('fs'),
|
fs = require('fs'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
shell = require('shelljs');
|
mkdirp = require('mkdirp-no-bin');
|
||||||
|
|
||||||
module.exports = Generator;
|
module.exports = Generator;
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ Generator.prototype.makeDirectories = function(){
|
|||||||
if (!this.directory) {
|
if (!this.directory) {
|
||||||
throw new Error('Generators must define their directory in their constructor.\nEx: \'pages\', \'components\', etc.');
|
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() {
|
Generator.prototype.renderTemplates = function renderTemplates() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
var path = require('path'),
|
var path = require('path'),
|
||||||
fs = require('fs'),
|
fs = require('fs'),
|
||||||
shell = require('shelljs'),
|
mkdirp = require('mkdirp-no-bin'),
|
||||||
Generator = require('../../generator');
|
Generator = require('../../generator');
|
||||||
|
|
||||||
module.exports = PipeGenerator;
|
module.exports = PipeGenerator;
|
||||||
@ -14,7 +14,7 @@ function PipeGenerator(options) {
|
|||||||
PipeGenerator.prototype = Object.create(Generator.prototype);
|
PipeGenerator.prototype = Object.create(Generator.prototype);
|
||||||
|
|
||||||
PipeGenerator.prototype.makeDirectories = function(){
|
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() {
|
PipeGenerator.prototype.renderTemplates = function renderTemplates() {
|
||||||
|
Reference in New Issue
Block a user