Skip to content

Commit d884f4e

Browse files
committed
Merge pull request #20 from bholloway/master
removed --ide from init task due to technical problems
2 parents f638cb1 + d2ac946 commit d884f4e

File tree

1 file changed

+4
-32
lines changed

1 file changed

+4
-32
lines changed

tasks/init.js

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ var defaults = require('../lib/config/defaults'),
1616
streams = require('../lib/config/streams');
1717

1818
var TEMPLATE_PATH = path.join(__dirname, '..', 'templates', 'angularity');
19-
var IDE_LIST = ['webstorm']; // each of these needs to be a gulp-task in its own right
2019

2120
var cliArgs;
2221

@@ -32,8 +31,7 @@ var config = defaults.getInstance('init')
3231
bower : true,
3332
karma : true,
3433
jshint : true,
35-
gitignore : true,
36-
ide : 'none'
34+
gitignore : true
3735
});
3836

3937
var check = yargs.createCheck()
@@ -102,23 +100,14 @@ var check = yargs.createCheck()
102100
if (typeof value !== 'boolean') {
103101
return 'gitignore must be a boolean';
104102
}
105-
},
106-
ide : function (value) {
107-
[ ].concat(value).forEach(function (value) {
108-
if (typeof value !== 'string') {
109-
return 'ide must be a string';
110-
} else if ((['none'].concat(IDE_LIST).indexOf(value) >= 0)) {
111-
return 'value must be "none" or one or more values in ' + IDE_LIST.join('|');
112-
}
113-
});
114103
}
115104
})
116105
.commit();
117106

118107
yargs.getInstance('init')
119108
.usage(wordwrap(2, 80)([
120-
'The "init" task initialises a blank project and optionally an IDE environment. The given options initialise ' +
121-
'project defaults. Where omitted the global default will be in effect for the project.',
109+
'The "init" task initialises a blank project. The given options initialise project defaults. Where omitted the ' +
110+
'global default will be in effect for the project.',
122111
'',
123112
'The following steps are taken. Some steps are gated by respective a flag. Default options may be globally ' +
124113
'defined or reset using the --defaults option.',
@@ -133,20 +122,14 @@ yargs.getInstance('init')
133122
'* karma.conf.js exists, else create --karma',
134123
'* .jshintrc exists, else create --jshint',
135124
'* .gitignore exists, else create --gitignore',
136-
'* run IDE task --ide',
137125
'',
138126
'If a package.json is present initialisation will occur in the current directory. Otherwise a sub-directory is' +
139127
'created per the project name',
140128
'',
141129
'Where run on an exising project existing files will not be altered, delete existing files in order to change ' +
142130
'properties.',
143131
'',
144-
'Both the npm and bower packages are initially set private which you will need to clear in order to publish.',
145-
'',
146-
'Available IDE tasks include:',
147-
IDE_LIST.join(', '),
148-
'',
149-
'Any given IDE is initialised per its task defaults. Use the task separately to review these options.'
132+
'Both the npm and bower packages are initially set private which you will need to clear in order to publish.'
150133
].join('\n')))
151134
.example('angularity init -n todo -i webstorm', 'Create "todo" and initialise webstorm')
152135
.example('angularity init --defaults -n pending', 'Change the name default to "pending')
@@ -215,11 +198,6 @@ yargs.getInstance('init')
215198
boolean : true,
216199
default : config.get('gitignore')
217200
})
218-
.options('ide', {
219-
describe: 'Run an IDE initialisation task',
220-
string : true,
221-
default : config.get('ide')
222-
})
223201
.strict()
224202
.check(yargs.subCommandCheck)
225203
.check(check)
@@ -243,11 +221,6 @@ gulp.task('init', function (done) {
243221

244222
// else run the selected items
245223
else {
246-
var ideList = []
247-
.concat(cliArgs.ide) // yargs will supply multiple arguments if multiple flags are used
248-
.filter(function (ide) {
249-
return (IDE_LIST.indexOf(ide) >= 0);
250-
});
251224
var taskList = [
252225
'init:subdir',
253226
'init:composition',
@@ -258,7 +231,6 @@ gulp.task('init', function (done) {
258231
cliArgs.jshint && 'init:jshint',
259232
cliArgs.gitignore && 'init:gitignore'
260233
]
261-
.concat(ideList)
262234
.filter(Boolean)
263235
.concat(done);
264236
runSequence.apply(runSequence, taskList);

0 commit comments

Comments
 (0)