Commit 1a72e33 1 parent 72ef201 commit 1a72e33 Copy full SHA for 1a72e33
File tree 2 files changed +29
-1
lines changed
2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,14 @@ function buildGeneral(options = {}) {
135
135
return ;
136
136
}
137
137
138
+ if ( helpers . hasAnyProcessParam ( ) ) {
139
+ console . log ( "Unknown parameter." ) ;
140
+
141
+ process . exit ( 1 ) ;
142
+
143
+ return ;
144
+ }
145
+
138
146
const flags = [
139
147
[ 'all' , 'build all' ] ,
140
148
[ 'extension' , 'build extension package' ] ,
Original file line number Diff line number Diff line change @@ -207,10 +207,17 @@ Export.getProcessParam = name => {
207
207
return value ;
208
208
}
209
209
210
+ /**
211
+ * @param {string } string
212
+ * @return {string }
213
+ */
210
214
Export . camelCaseToHyphen = ( string => string . replace ( / ( [ a - z ] ) ( [ A - Z ] ) / g, '$1-$2' ) . toLowerCase ( ) ) ;
211
215
216
+ /**
217
+ * @return {boolean }
218
+ */
212
219
Export . hasProcessParam = param => {
213
- for ( let i in process . argv ) {
220
+ for ( const i in process . argv ) {
214
221
if ( process . argv [ i ] === '--' + param ) {
215
222
return true ;
216
223
}
@@ -219,4 +226,17 @@ Export.hasProcessParam = param => {
219
226
return false ;
220
227
}
221
228
229
+ /**
230
+ * @return {boolean }
231
+ */
232
+ Export . hasAnyProcessParam = ( ) => {
233
+ for ( const i in process . argv ) {
234
+ if ( process . argv [ i ] . startsWith ( '--' ) ) {
235
+ return true ;
236
+ }
237
+ }
238
+
239
+ return false ;
240
+ }
241
+
222
242
export default Export ;
You can’t perform that action at this time.
0 commit comments