Skip to content

Commit a19e996

Browse files
committed
Introduce a --disable-npm-install option
Allow for advanced uses that run `npm install` only once and want to avoid rerunning it on every command.
1 parent d3ffde6 commit a19e996

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

lib/declarations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ interface IOptions extends ICommonOptions {
8282
frameworkPath: string;
8383
frameworkVersion: string;
8484
ignoreScripts: boolean;
85+
disableNpmInstall: boolean;
8586
ipa: string;
8687
keyStoreAlias: string;
8788
keyStoreAliasPassword: string;

lib/node-package-manager.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ export class NodePackageManager implements INodePackageManager {
3737
}
3838

3939
public install(packageName: string, pathToSave: string, config?: any): IFuture<any> {
40+
if (this.$options.disableNpmInstall) {
41+
return Future.fromResult();
42+
}
4043
if (this.$options.ignoreScripts) {
4144
config = config || {};
4245
config["ignore-scripts"] = true;

lib/options.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export class Options extends commonOptionsLibPath.OptionsBase {
2626
keyStoreAlias: { type: OptionType.String },
2727
keyStoreAliasPassword: { type: OptionType.String },
2828
ignoreScripts: {type: OptionType.Boolean },
29+
disableNpmInstall: {type: OptionType.Boolean },
2930
tnsModulesVersion: { type: OptionType.String },
3031
compileSdk: {type: OptionType.Number },
3132
port: { type: OptionType.Number },

0 commit comments

Comments
 (0)