mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 01:54:04 +08:00
docs: replace app
with application
This commit is contained in:
parent
7fa3e65879
commit
9ddb220c3d
@ -6,12 +6,12 @@
|
||||
"properties": {
|
||||
"browserTarget": {
|
||||
"type": "string",
|
||||
"description": "A browser builder target use for rendering the app shell in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
|
||||
"description": "A browser builder target use for rendering the application shell in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
|
||||
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
||||
},
|
||||
"serverTarget": {
|
||||
"type": "string",
|
||||
"description": "A server builder target use for rendering the app shell in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
|
||||
"description": "A server builder target use for rendering the application shell in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
|
||||
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
||||
},
|
||||
"appModuleBundle": {
|
||||
|
@ -75,7 +75,7 @@
|
||||
},
|
||||
"servePath": {
|
||||
"type": "string",
|
||||
"description": "The pathname where the app will be served."
|
||||
"description": "The pathname where the application will be served."
|
||||
},
|
||||
"disableHostCheck": {
|
||||
"type": "boolean",
|
||||
|
@ -125,7 +125,7 @@ function validateProject(mainPath: string): Rule {
|
||||
const tmpl = getComponentTemplateInfo(host, componentPath);
|
||||
const template = getComponentTemplate(host, componentPath, tmpl);
|
||||
if (!routerOutletCheckRegex.test(template)) {
|
||||
const errorMsg = `Prerequisite for app shell is to define a router-outlet in your root component.`;
|
||||
const errorMsg = `Prerequisite for application shell is to define a router-outlet in your root component.`;
|
||||
context.logger.error(errorMsg);
|
||||
throw new SchematicsException(errorMsg);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
"$id": "SchematicsAngularAppShell",
|
||||
"title": "Angular AppShell Options Schema",
|
||||
"type": "object",
|
||||
"description": "Generates an app shell for running a server-side version of an app.",
|
||||
"description": "Generates an application shell for running a server-side version of an app.",
|
||||
"additionalProperties": false,
|
||||
"long-description": "./app-shell-long.md",
|
||||
"properties": {
|
||||
@ -16,13 +16,13 @@
|
||||
},
|
||||
"route": {
|
||||
"type": "string",
|
||||
"description": "Route path used to produce the app shell.",
|
||||
"description": "Route path used to produce the application shell.",
|
||||
"default": "shell"
|
||||
},
|
||||
"appId": {
|
||||
"type": "string",
|
||||
"format": "html-selector",
|
||||
"description": "The app ID to use in withServerTransition().",
|
||||
"description": "The application ID to use in withServerTransition().",
|
||||
"default": "serverApp"
|
||||
},
|
||||
"main": {
|
||||
|
@ -3,7 +3,7 @@
|
||||
"$id": "SchematicsAngularApp",
|
||||
"title": "Angular Application Options Schema",
|
||||
"type": "object",
|
||||
"description": "Generates a new basic app definition in the \"projects\" subfolder of the workspace.",
|
||||
"description": "Generates a new basic application definition in the \"projects\" subfolder of the workspace.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"projectRoot": {
|
||||
|
@ -102,7 +102,7 @@
|
||||
},
|
||||
"app-shell": {
|
||||
"factory": "./app-shell",
|
||||
"description": "Create an app shell.",
|
||||
"description": "Create an application shell.",
|
||||
"schema": "./app-shell/schema.json"
|
||||
},
|
||||
"library": {
|
||||
|
@ -1,2 +1,2 @@
|
||||
The e2e tests are created in a separate app in the `projects` folder of the workspace,
|
||||
The e2e tests are created in a separate application in the `projects` folder of the workspace,
|
||||
next to the project being tested.
|
||||
|
@ -13,7 +13,7 @@
|
||||
"default": "app-root"
|
||||
},
|
||||
"relatedAppName": {
|
||||
"description": "The name of the app being tested.",
|
||||
"description": "The name of the application being tested.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
|
@ -95,11 +95,11 @@ function updateAppModule(mainPath: string): Rule {
|
||||
}
|
||||
}
|
||||
|
||||
// register SW in app module
|
||||
// register SW in application module
|
||||
const importText = tags.stripIndent`
|
||||
ServiceWorkerModule.register('ngsw-worker.js', {
|
||||
enabled: ${importModule}.production,
|
||||
// Register the ServiceWorker as soon as the app is stable
|
||||
// Register the ServiceWorker as soon as the application is stable
|
||||
// or after 30 seconds (whichever comes first).
|
||||
registrationStrategy: 'registerWhenStable:30000'
|
||||
})
|
||||
@ -146,7 +146,7 @@ export default function (options: ServiceWorkerOptions): Rule {
|
||||
if (!buildTarget) {
|
||||
throw targetBuildNotFoundError();
|
||||
}
|
||||
const buildOptions = ((buildTarget.options || {}) as unknown) as BrowserBuilderOptions;
|
||||
const buildOptions = (buildTarget.options || {}) as unknown as BrowserBuilderOptions;
|
||||
const root = project.root;
|
||||
buildOptions.serviceWorker = true;
|
||||
buildOptions.ngswConfigPath = join(normalize(root), 'ngsw-config.json');
|
||||
|
@ -90,7 +90,7 @@ describe('Service Worker Schematic', () => {
|
||||
new RegExp(
|
||||
"(\\s+)ServiceWorkerModule\\.register\\('ngsw-worker\\.js', \\{\\n" +
|
||||
'\\1 enabled: environment\\.production,\\n' +
|
||||
'\\1 // Register the ServiceWorker as soon as the app is stable\\n' +
|
||||
'\\1 // Register the ServiceWorker as soon as the application is stable\\n' +
|
||||
'\\1 // or after 30 seconds \\(whichever comes first\\)\\.\\n' +
|
||||
"\\1 registrationStrategy: 'registerWhenStable:30000'\\n" +
|
||||
'\\1}\\)',
|
||||
@ -128,7 +128,7 @@ describe('Service Worker Schematic', () => {
|
||||
new RegExp(
|
||||
"(\\s+)ServiceWorkerModule\\.register\\('ngsw-worker\\.js', \\{\\n" +
|
||||
'\\1 enabled: env\\.production,\\n' +
|
||||
'\\1 // Register the ServiceWorker as soon as the app is stable\\n' +
|
||||
'\\1 // Register the ServiceWorker as soon as the application is stable\\n' +
|
||||
'\\1 // or after 30 seconds \\(whichever comes first\\)\\.\\n' +
|
||||
"\\1 registrationStrategy: 'registerWhenStable:30000'\\n" +
|
||||
'\\1}\\)',
|
||||
@ -166,7 +166,7 @@ describe('Service Worker Schematic', () => {
|
||||
new RegExp(
|
||||
"(\\s+)ServiceWorkerModule\\.register\\('ngsw-worker\\.js', \\{\\n" +
|
||||
'\\1 enabled: environment\\.production,\\n' +
|
||||
'\\1 // Register the ServiceWorker as soon as the app is stable\\n' +
|
||||
'\\1 // Register the ServiceWorker as soon as the application is stable\\n' +
|
||||
'\\1 // or after 30 seconds \\(whichever comes first\\)\\.\\n' +
|
||||
"\\1 registrationStrategy: 'registerWhenStable:30000'\\n" +
|
||||
'\\1}\\)',
|
||||
|
@ -16,7 +16,7 @@
|
||||
"appId": {
|
||||
"type": "string",
|
||||
"format": "html-selector",
|
||||
"description": "The app identifier to use for transition.",
|
||||
"description": "The application identifier to use for transition.",
|
||||
"default": "serverApp"
|
||||
},
|
||||
"main": {
|
||||
|
@ -60,7 +60,7 @@ export function findBootstrapModulePath(host: Tree, mainPath: string): string {
|
||||
|
||||
const mainBuffer = host.read(mainPath);
|
||||
if (!mainBuffer) {
|
||||
throw new SchematicsException(`Client app main file (${mainPath}) not found`);
|
||||
throw new SchematicsException(`Client application main file (${mainPath}) not found`);
|
||||
}
|
||||
const mainText = mainBuffer.toString('utf-8');
|
||||
const source = ts.createSourceFile(mainPath, mainText, ts.ScriptTarget.Latest, true);
|
||||
|
@ -4,7 +4,7 @@ This project was generated with [Angular CLI](https://github.com/angular/angular
|
||||
|
||||
## Development server
|
||||
|
||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
|
||||
|
||||
## Code scaffolding
|
||||
|
||||
|
@ -535,7 +535,7 @@
|
||||
"default": "@schematics/angular"
|
||||
},
|
||||
"newApp": {
|
||||
"description": "The new app schematic.",
|
||||
"description": "The new application schematic.",
|
||||
"type": "string",
|
||||
"default": "application"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user