Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/nx/src/builders/build/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ export function runBuilder(options: BuildBuilderSchema, context: ExecutorContext
} else {
if (isBuild) {
nsOptions.push('build');
} else if (options.prepare) {
nsOptions.push('prepare');
} else {
if (options.debug === false) {
nsOptions.push('run');
Expand Down Expand Up @@ -156,7 +158,7 @@ export function runBuilder(options: BuildBuilderSchema, context: ExecutorContext
nsOptions.push('--copy-to');
nsOptions.push(options.copyTo);
}

if (fileReplacements.length) {
// console.log('fileReplacements:', fileReplacements);
nsOptions.push('--env.replace');
Expand Down
4 changes: 3 additions & 1 deletion packages/nx/src/builders/build/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export interface BuildBuilderSchema extends JsonObject {
production?: boolean;
platform?: 'ios' | 'android';
copyTo?: string;
/** For running `ns prepare <platform>` */
prepare:? boolean;

// ios only
provision?: string;
Expand All @@ -23,4 +25,4 @@ export interface BuildBuilderSchema extends JsonObject {
keyStorePassword?: string;
keyStoreAlias?: string;
keyStoreAliasPassword?: string;
}
}
7 changes: 6 additions & 1 deletion packages/nx/src/builders/build/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
"type": "string",
"description": "When building, copy the package to this location."
},
"prepare:": {
"type": "boolean",
"description": "Starts a Webpack compilation and prepares the app's App_Resources and the plugins platforms directories. The output is generated in a subdirectory for the selected target platform in the platforms directory. This lets you build the project for the selected platform.",
"default": false
},
"provision": {
"type": "string",
"description": "(iOS Only) When building, use this provision profile name."
Expand Down Expand Up @@ -89,4 +94,4 @@
}
},
"required": []
}
}