parent
84b4593d01
commit
b7a6e1fef7
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
The [**Angular CLI**](https://cli.angular.io/), Angular applications, and Angular itself depend upon features and functionality provided by libraries that are available as [**npm**](https://docs.npmjs.com/) packages.
|
The [**Angular CLI**](https://cli.angular.io/), Angular applications, and Angular itself depend upon features and functionality provided by libraries that are available as [**npm**](https://docs.npmjs.com/) packages.
|
||||||
|
|
||||||
You can download and install these npm packages with the [**npm client**](https://docs.npmjs.com/cli/install), which runs as a node.js application.
|
You can download and install these npm packages with the [**npm client**](https://docs.npmjs.com/cli/install), which runs as a Node.js® application.
|
||||||
|
|
||||||
The [**yarn client**](https://yarnpkg.com/en/) is a popular alternative for downloading and installing npm packages.
|
The [**yarn client**](https://yarnpkg.com/en/) is a popular alternative for downloading and installing npm packages.
|
||||||
The Angular CLI uses `yarn` by default to install npm packages when you create a new project.
|
The Angular CLI uses `yarn` by default to install npm packages when you create a new project.
|
||||||
|
@ -14,19 +14,19 @@ Node.js and npm are essential to Angular development.
|
||||||
[Get them now](https://docs.npmjs.com/getting-started/installing-node "Installing Node.js and updating npm")
|
[Get them now](https://docs.npmjs.com/getting-started/installing-node "Installing Node.js and updating npm")
|
||||||
if they're not already installed on your machine.
|
if they're not already installed on your machine.
|
||||||
|
|
||||||
**Verify that you are running node `v4.x.x` or higher and npm `3.x.x` or higher**
|
**Verify that you are running Node.js `v8.x` or higher and npm `5.x` or higher**
|
||||||
by running the commands `node -v` and `npm -v` in a terminal/console window.
|
by running the commands `node -v` and `npm -v` in a terminal/console window.
|
||||||
Older versions produce errors.
|
Older versions produce errors.
|
||||||
|
|
||||||
Consider using [nvm](https://github.com/creationix/nvm) for managing multiple
|
Consider using [nvm](https://github.com/creationix/nvm) for managing multiple
|
||||||
versions of node and npm. You may need [nvm](https://github.com/creationix/nvm) if
|
versions of Node.js and npm. You may need [nvm](https://github.com/creationix/nvm) if
|
||||||
you already have projects running on your machine that use other versions of node and npm.
|
you already have projects running on your machine that use other versions of Node.js and npm.
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## _package.json_
|
## _package.json_
|
||||||
|
|
||||||
Both `npm` and `yarn` install packages identified in a [**package.json**](https://docs.npmjs.com/files/package.json) file.
|
Both `node` and `yarn` install packages are identified in a [**package.json**](https://docs.npmjs.com/files/package.json) file.
|
||||||
|
|
||||||
The CLI `ng new` command creates a default `package.json` file for your project.
|
The CLI `ng new` command creates a default `package.json` file for your project.
|
||||||
This `package.json` specifies _a starter set of packages_ that work well together and
|
This `package.json` specifies _a starter set of packages_ that work well together and
|
||||||
|
@ -129,7 +129,7 @@ You don't deploy them with the production application although there is no harm
|
||||||
For example, see the [Angular language service extension for VS Code](https://marketplace.visualstudio.com/items?itemName=Angular.ng-template)
|
For example, see the [Angular language service extension for VS Code](https://marketplace.visualstudio.com/items?itemName=Angular.ng-template)
|
||||||
|
|
||||||
|
|
||||||
**@types/... **: TypeScript definition files for 3rd party libraries such as Jasmine and node.
|
**@types/... **: TypeScript definition files for 3rd party libraries such as Jasmine and Node.js.
|
||||||
|
|
||||||
|
|
||||||
**[codelyzer](https://www.npmjs.com/package/codelyzer)**: A linter for Angular apps whose rules conform to the Angular [style guide](guide/styleguide).
|
**[codelyzer](https://www.npmjs.com/package/codelyzer)**: A linter for Angular apps whose rules conform to the Angular [style guide](guide/styleguide).
|
||||||
|
@ -145,7 +145,7 @@ For example, see the [Angular language service extension for VS Code](https://ma
|
||||||
Built on top of [WebDriverJS](https://github.com/SeleniumHQ/selenium/wiki/WebDriverJs).
|
Built on top of [WebDriverJS](https://github.com/SeleniumHQ/selenium/wiki/WebDriverJs).
|
||||||
|
|
||||||
|
|
||||||
**[ts-node](https://www.npmjs.com/package/ts-node)**: TypeScript execution environment and REPL for node.
|
**[ts-node](https://www.npmjs.com/package/ts-node)**: TypeScript execution environment and REPL for Node.js.
|
||||||
|
|
||||||
|
|
||||||
**[tslint](https://www.npmjs.com/package/tslint)**: a static analysis tool that checks TypeScript code for readability, maintainability, and functionality errors.
|
**[tslint](https://www.npmjs.com/package/tslint)**: a static analysis tool that checks TypeScript code for readability, maintainability, and functionality errors.
|
||||||
|
|
|
@ -32,7 +32,7 @@ if they are not already on your machine.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**Verify that you are running at least node `6.9.x` and npm `3.x.x`**
|
**Verify that you are running at least Node.js version `8.x`or greater and npm version `5.x` or greater**
|
||||||
by running `node -v` and `npm -v` in a terminal/console window.
|
by running `node -v` and `npm -v` in a terminal/console window.
|
||||||
Older versions produce errors, but newer versions are fine.
|
Older versions produce errors, but newer versions are fine.
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ Setting up a new project on your machine is quick and easy with the **QuickStart
|
||||||
maintained [on github](https://github.com/angular/quickstart "Install the github QuickStart repo").
|
maintained [on github](https://github.com/angular/quickstart "Install the github QuickStart repo").
|
||||||
|
|
||||||
|
|
||||||
Make sure you have [node and npm installed](guide/setup#install-prerequisites "What if you don't have node and npm?").
|
Make sure you have [Node.js® and npm installed](guide/setup#install-prerequisites "What if you don't have Node.js and npm?").
|
||||||
|
|
||||||
{@a clone}
|
{@a clone}
|
||||||
|
|
||||||
|
@ -301,23 +301,22 @@ If you're new to Angular, we recommend you follow the [tutorial](tutorial "Tour
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Appendix: node and npm
|
## Appendix: NodeJS and NPM
|
||||||
|
|
||||||
|
|
||||||
Node.js and npm are essential to modern web development with Angular and other platforms.
|
[Node.js](https://nodejs.org/en/) and the [npm](https://www.npmjs.com/) package manager are essential to modern web development with Angular and other platforms.
|
||||||
Node powers client development and build tools.
|
NodeJS powers client development and build tools.
|
||||||
The _npm_ package manager, itself a _node_ application, installs JavaScript libraries.
|
The _npm_ package manager, which is itself a _NodeJS_ application, installs JavaScript libraries.
|
||||||
|
|
||||||
<a href="https://docs.npmjs.com/getting-started/installing-node" target="_blank" title="Installing Node.js and updating npm">
|
<a href="https://docs.npmjs.com/getting-started/installing-node" target="_blank" title="Installing Node.js and updating npm">
|
||||||
Get them now</a> if they're not already installed on your machine.
|
Get them now</a> if they're not already installed on your machine.
|
||||||
|
|
||||||
**Verify that you are running node `v4.x.x` or higher and npm `3.x.x` or higher**
|
**Verify that you are running Node.js `v8.x` or higher and npm `5.x` or higher**
|
||||||
by running the commands `node -v` and `npm -v` in a terminal/console window.
|
by running the commands `node -v` and `npm -v` in a terminal/console window.
|
||||||
Older versions produce errors.
|
Older versions produce errors.
|
||||||
|
|
||||||
We recommend [nvm](https://github.com/creationix/nvm) for managing multiple versions of node and npm.
|
We recommend [nvm](https://github.com/creationix/nvm) for managing multiple versions of Node.js and npm.
|
||||||
You may need [nvm](https://github.com/creationix/nvm) if you already have projects running on your machine that
|
You may need [nvm](https://github.com/creationix/nvm) if you already have projects running on your machine that use other versions of Node.js and npm.
|
||||||
use other versions of node and npm.
|
|
||||||
|
|
||||||
|
|
||||||
{@a why-locally}
|
{@a why-locally}
|
||||||
|
|
|
@ -131,7 +131,7 @@ QuickStart identifies two *typings*, or `d.ts`, files:
|
||||||
|
|
||||||
* [jasmine](http://jasmine.github.io/) typings for the Jasmine test framework.
|
* [jasmine](http://jasmine.github.io/) typings for the Jasmine test framework.
|
||||||
|
|
||||||
* [node](https://www.npmjs.com/package/@types/node) for code that references objects in the *nodejs* environment;
|
* [node](https://www.npmjs.com/package/@types/node) for code that references objects in the *Node.js®* environment;
|
||||||
you can view an example in the [webpack](guide/webpack) page.
|
you can view an example in the [webpack](guide/webpack) page.
|
||||||
|
|
||||||
QuickStart doesn't require these typings but many of the samples do.
|
QuickStart doesn't require these typings but many of the samples do.
|
||||||
|
|
|
@ -16,7 +16,7 @@ Meanwhile, the browser downloads the full client version and switches to it auto
|
||||||
<div class="l-sub-section">
|
<div class="l-sub-section">
|
||||||
|
|
||||||
[Download the finished sample code](generated/zips/universal/universal.zip),
|
[Download the finished sample code](generated/zips/universal/universal.zip),
|
||||||
which runs in a [node express](https://expressjs.com/) server.
|
which runs in a [Node.js® Express](https://expressjs.com/) server.
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ You'll add more files to support building and serving with Universal.
|
||||||
|
|
||||||
In this example, the Angular CLI compiles and bundles the Universal version of the app with the
|
In this example, the Angular CLI compiles and bundles the Universal version of the app with the
|
||||||
[AOT (Ahead-of-Time) compiler](guide/aot-compiler).
|
[AOT (Ahead-of-Time) compiler](guide/aot-compiler).
|
||||||
A node/express web server turns client requests into the HTML pages rendered by Universal.
|
A Node.js® Express web server turns client requests into the HTML pages rendered by Universal.
|
||||||
|
|
||||||
You will create:
|
You will create:
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ if they are not already on your machine.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**Verify that you are running node version `4.6.x` or greater, and npm `3.x.x` or greater**
|
**Verify that you are running NodeJS version `8.x` or greater, and npm `5.x` or greater**
|
||||||
by running `node -v` and `npm -v` in a terminal window.
|
by running `node -v` and `npm -v` in a terminal window.
|
||||||
Older versions produce errors.
|
Older versions produce errors.
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,7 @@
|
||||||
"picture": "wardbell.jpg",
|
"picture": "wardbell.jpg",
|
||||||
"website": "https://github.com/wardbell",
|
"website": "https://github.com/wardbell",
|
||||||
"twitter": "wardbell",
|
"twitter": "wardbell",
|
||||||
"bio": "Ward is an all-around developer with JavaScript, node, and .net chops. He's a frequent conference speaker and podcaster, trainer, Google Developer Expert for Angular, Microsoft MVP, and PluralSight author. He is also president of IdeaBlade, an enterprise software consulting firm and the makers of breeze.js. He would like to get more sleep and spend more time in the mountains.",
|
"bio": "Ward is an all-around developer with JavaScript, Node.js®, and .net chops. He's a frequent conference speaker and podcaster, trainer, Google Developer Expert for Angular, Microsoft MVP, and PluralSight author. He is also president of IdeaBlade, an enterprise software consulting firm and the makers of breeze.js. He would like to get more sleep and spend more time in the mountains.",
|
||||||
"group": "Angular"
|
"group": "Angular"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
<div class="feature">
|
<div class="feature">
|
||||||
<div class="feature-title">Universal</div>
|
<div class="feature-title">Universal</div>
|
||||||
<p class="text-body">Serve the first view of your application on node.js, .NET, PHP, and other servers for near-instant rendering in just HTML and CSS. Also paves the way for sites that optimize for SEO.</p>
|
<p class="text-body">Serve the first view of your application on Node.js®, .NET, PHP, and other servers for near-instant rendering in just HTML and CSS. Also paves the way for sites that optimize for SEO.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="feature">
|
<div class="feature">
|
||||||
|
|
|
@ -202,7 +202,7 @@
|
||||||
"url": "https://github.com/angular/universal"
|
"url": "https://github.com/angular/universal"
|
||||||
},
|
},
|
||||||
"c1": {
|
"c1": {
|
||||||
"desc": "Lightweight development only node server",
|
"desc": "Lightweight development only Node.js® server",
|
||||||
"logo": "",
|
"logo": "",
|
||||||
"rev": true,
|
"rev": true,
|
||||||
"title": "Lite-server",
|
"title": "Lite-server",
|
||||||
|
|
Loading…
Reference in New Issue