CR: Spacing
This commit is contained in:
parent
345faa6ea5
commit
4c8c792869
|
@ -24,11 +24,11 @@ const {
|
||||||
} = require( '../utils/scaffold' );
|
} = require( '../utils/scaffold' );
|
||||||
|
|
||||||
const args = process.argv.slice( 2 );
|
const args = process.argv.slice( 2 );
|
||||||
const command = args[0];
|
const command = args[ 0 ];
|
||||||
let packageName = null;
|
let packageName = null;
|
||||||
|
|
||||||
if ( args[1] && args[1].substr(0, 2) !== '--' ) {
|
if ( args[ 1 ] && args[ 1 ].substr(0, 2) !== '--' ) {
|
||||||
packageName = args[1];
|
packageName = args[ 1 ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow multiple spec file extensions and formats.
|
// Allow multiple spec file extensions and formats.
|
||||||
|
@ -36,7 +36,7 @@ let testExtension = 'test.js';
|
||||||
let testFormat = '';
|
let testFormat = '';
|
||||||
let force = false;
|
let force = false;
|
||||||
for ( let a = 1; a < args.length; a++ ) {
|
for ( let a = 1; a < args.length; a++ ) {
|
||||||
if (args[a] === '--force') {
|
if ( args[ a ] === '--force' ) {
|
||||||
force = true;
|
force = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ for ( let a = 1; a < args.length; a++ ) {
|
||||||
if ( command == 'install' ) {
|
if ( command == 'install' ) {
|
||||||
// Install some environment defaults if no package is requested.
|
// Install some environment defaults if no package is requested.
|
||||||
if ( ! packageName ) {
|
if ( ! packageName ) {
|
||||||
installDefaults(force);
|
installDefaults( force );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ if ( command == 'install' ) {
|
||||||
importLineFormat = sprintf( "import {%%s} from '%s';", pkg );
|
importLineFormat = sprintf( "import {%%s} from '%s';", pkg );
|
||||||
}
|
}
|
||||||
let overwriteFiles;
|
let overwriteFiles;
|
||||||
if (force) {
|
if ( force ) {
|
||||||
overwriteFiles = 'a';
|
overwriteFiles = 'a';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue