mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 22:34:21 +08:00
test: remove unused E2E size tracking artifact generation test
These files are no longer used to perform any size tracking and are also no longer stored as artifacts within CircleCI.
This commit is contained in:
parent
6bd789049d
commit
ba296e9df2
@ -1,48 +0,0 @@
|
||||
import {
|
||||
appendToFile,
|
||||
moveDirectory,
|
||||
prependToFile,
|
||||
replaceInFile,
|
||||
writeFile,
|
||||
} from '../../utils/fs';
|
||||
import { ng } from '../../utils/process';
|
||||
|
||||
export default async function () {
|
||||
// Store the production build for artifact storage on CircleCI
|
||||
if (process.env['CIRCLECI']) {
|
||||
// Add initial app routing.
|
||||
// This is done automatically on a new app with --routing but must be done manually on
|
||||
// existing apps.
|
||||
const appRoutingModulePath = 'src/app/app-routing.module.ts';
|
||||
await writeFile(
|
||||
appRoutingModulePath,
|
||||
`
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
const routes: Routes = [];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
`,
|
||||
);
|
||||
await prependToFile(
|
||||
'src/app/app.module.ts',
|
||||
`import { AppRoutingModule } from './app-routing.module';`,
|
||||
);
|
||||
await replaceInFile('src/app/app.module.ts', `imports: [`, `imports: [ AppRoutingModule,`);
|
||||
await appendToFile('src/app/app.component.html', '<router-outlet></router-outlet>');
|
||||
|
||||
// Add a lazy module.
|
||||
await ng('generate', 'module', 'lazy', '--route=lazy', '--module=app.module');
|
||||
|
||||
// Build without hashing and with named chunks to keep have consistent file names.
|
||||
await ng('build', '--output-hashing=none', '--named-chunks=true');
|
||||
|
||||
// Upload to the store_artifacts dir listed in .circleci/config.yml
|
||||
await moveDirectory('dist', '/tmp/dist');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user