parent
2a47cdf0aa
commit
f95f855cf7
@ -48,6 +48,14 @@ Type: `string`
|
||||
|
||||
The crossorigin attribute to use for generated javascript script tags. One of 'none' | 'anonymous' | 'use-credentials'
|
||||
|
||||
### deleteOutputPath
|
||||
|
||||
Default: `true`
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
Delete the output path before building.
|
||||
|
||||
### deployUrl
|
||||
|
||||
Type: `string`
|
||||
|
||||
@ -28,6 +28,14 @@ Possible values: `dependencies`, `peerDependencies`
|
||||
|
||||
When updateBuildableProjectDepsInPackageJson is true, this adds dependencies to either `peerDependencies` or `dependencies`
|
||||
|
||||
### deleteOutputPath
|
||||
|
||||
Default: `true`
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
Delete the output path before building.
|
||||
|
||||
### entryFile
|
||||
|
||||
Type: `string`
|
||||
|
||||
@ -49,6 +49,14 @@ Type: `string`
|
||||
|
||||
The crossorigin attribute to use for generated javascript script tags. One of 'none' | 'anonymous' | 'use-credentials'
|
||||
|
||||
### deleteOutputPath
|
||||
|
||||
Default: `true`
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
Delete the output path before building.
|
||||
|
||||
### deployUrl
|
||||
|
||||
Type: `string`
|
||||
|
||||
@ -29,6 +29,14 @@ Possible values: `dependencies`, `peerDependencies`
|
||||
|
||||
When updateBuildableProjectDepsInPackageJson is true, this adds dependencies to either `peerDependencies` or `dependencies`
|
||||
|
||||
### deleteOutputPath
|
||||
|
||||
Default: `true`
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
Delete the output path before building.
|
||||
|
||||
### entryFile
|
||||
|
||||
Type: `string`
|
||||
|
||||
@ -49,6 +49,14 @@ Type: `string`
|
||||
|
||||
The crossorigin attribute to use for generated javascript script tags. One of 'none' | 'anonymous' | 'use-credentials'
|
||||
|
||||
### deleteOutputPath
|
||||
|
||||
Default: `true`
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
Delete the output path before building.
|
||||
|
||||
### deployUrl
|
||||
|
||||
Type: `string`
|
||||
|
||||
@ -29,6 +29,14 @@ Possible values: `dependencies`, `peerDependencies`
|
||||
|
||||
When updateBuildableProjectDepsInPackageJson is true, this adds dependencies to either `peerDependencies` or `dependencies`
|
||||
|
||||
### deleteOutputPath
|
||||
|
||||
Default: `true`
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
Delete the output path before building.
|
||||
|
||||
### entryFile
|
||||
|
||||
Type: `string`
|
||||
|
||||
@ -74,6 +74,15 @@ describe('Web Components Applications', () => {
|
||||
`dist/libs/${libName}/_should_remove.txt`
|
||||
);
|
||||
checkFilesExist(`dist/apps/_should_not_remove.txt`);
|
||||
|
||||
// `delete-output-path`
|
||||
createFile(`dist/apps/${appName}/_should_keep.txt`);
|
||||
runCLI(`build ${appName} --delete-output-path=false`);
|
||||
checkFilesExist(`dist/apps/${appName}/_should_keep.txt`);
|
||||
|
||||
createFile(`dist/libs/${libName}/_should_keep.txt`);
|
||||
runCLI(`build ${libName} --delete-output-path=false`);
|
||||
checkFilesExist(`dist/libs/${libName}/_should_keep.txt`);
|
||||
}, 120000);
|
||||
|
||||
it('should do another build if differential loading is needed', async () => {
|
||||
|
||||
@ -56,6 +56,8 @@ export interface WebBuildBuilderOptions extends BuildBuilderOptions {
|
||||
|
||||
verbose?: boolean;
|
||||
buildLibsFromSource?: boolean;
|
||||
|
||||
deleteOutputPath?: boolean;
|
||||
}
|
||||
|
||||
export default createBuilder<WebBuildBuilderOptions & JsonObject>(run);
|
||||
@ -98,7 +100,9 @@ export function run(options: WebBuildBuilderOptions, context: BuilderContext) {
|
||||
}
|
||||
|
||||
// Delete output path before bundling
|
||||
if (options.deleteOutputPath) {
|
||||
deleteOutputDir(context.workspaceRoot, options.outputPath);
|
||||
}
|
||||
|
||||
return from(getSourceRoot(context))
|
||||
.pipe(
|
||||
|
||||
@ -19,6 +19,11 @@
|
||||
"type": "string",
|
||||
"description": "The output path of the generated files."
|
||||
},
|
||||
"deleteOutputPath": {
|
||||
"type": "boolean",
|
||||
"description": "Delete the output path before building.",
|
||||
"default": true
|
||||
},
|
||||
"watch": {
|
||||
"type": "boolean",
|
||||
"description": "Enable re-building when files change.",
|
||||
|
||||
@ -124,7 +124,9 @@ export function run(
|
||||
context.logger.info(`Bundling ${context.target.project}...`);
|
||||
|
||||
// Delete output path before bundling
|
||||
if (options.deleteOutputPath) {
|
||||
deleteOutputDir(context.workspaceRoot, options.outputPath);
|
||||
}
|
||||
|
||||
return from(rollupOptions).pipe(
|
||||
concatMap((opts) =>
|
||||
|
||||
@ -15,6 +15,11 @@
|
||||
"type": "string",
|
||||
"description": "The output path of the generated files."
|
||||
},
|
||||
"deleteOutputPath": {
|
||||
"type": "boolean",
|
||||
"description": "Delete the output path before building.",
|
||||
"default": true
|
||||
},
|
||||
"tsConfig": {
|
||||
"type": "string",
|
||||
"description": "The path to tsconfig file."
|
||||
|
||||
@ -60,6 +60,7 @@ export interface PackageBuilderOptions {
|
||||
updateBuildableProjectDepsInPackageJson?: boolean;
|
||||
buildableProjectDepsInPackageJsonType?: 'dependencies' | 'peerDependencies';
|
||||
umdName?: string;
|
||||
deleteOutputPath?: boolean;
|
||||
}
|
||||
|
||||
export interface AssetGlobPattern extends JsonObject {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user