Skip to content

Commit 1ce09dc

Browse files
committed
chore: update README
1 parent 1f12ef8 commit 1ce09dc

File tree

1 file changed

+50
-9
lines changed

1 file changed

+50
-9
lines changed

README.md

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
11
![Netlify Build plugin Angular Serverless – Run Angular Universal seamlessly on Netlify](netlify-plugin-angular.png)
22

3-
# Essential Angular Serverless Plugin
3+
# Angular Universal Plugin
44

5-
This build plugin is a utility for supporting Angular Universal on Netlify. This plugin should be installed by running a Netlify-specific Angular schematic.
5+
This build plugin is a utility for supporting Angular Universal on Netlify.
66

77
## Table of Contents
88

99
- [Installation and Configuration](#installation-and-configuration)
10+
- [CLI Usage](#cli-usage)
11+
- [Caveats](#caveats)
1012

1113
## Installation and Configuration
1214

13-
### Angular Schematic
15+
The schematic commands will create a `netlify.toml` in the root of your project, if it doesn't already exist. Your file should include the correct build command, publish directory, and plugins section below. Note: the build command requires you to include your custom project name (as indicated in your angular.json) where designated below:
1416

15-
```bash
16-
ng add netlify-schematics
17-
```
17+
```toml
18+
[build]
19+
command = "ng build --configuration production && ng run {projectName}:serverless:production"
20+
publish = "dist/netlify-serverless/browser"
1821

19-
```bash
20-
ng generate netlify-schematics:netlify-serverless`
22+
[[plugins]]
23+
package = "@netlify/plugin-angular-serverless"
2124
```
2225

23-
The schematic commands will create a `netlify.toml` in the root of your project, if it doesn't already exist. Your file should include the correct build command, publish directory, and plugins section below. Note: the build command requires you to include your custom project name (as indicated in your angular.json) where designated below:
26+
## Installation and Configuration
27+
28+
### Manual Installation
29+
30+
Create a `netlify.toml` in the root of your project. Your file should include the plugins section below:
2431

2532
```toml
2633
[build]
@@ -30,3 +37,37 @@ The schematic commands will create a `netlify.toml` in the root of your project,
3037
[[plugins]]
3138
package = "@netlify/plugin-angular-serverless"
3239
```
40+
41+
If you'd like to install this plugin at a fixed version, install it via your package manager:
42+
43+
```bash
44+
# yarn add @netlify/plugin-angular-universal
45+
npm install --save @netlify/plugin-angular-universal
46+
```
47+
48+
Read more about [file-based plugin installation](https://docs.netlify.com/configure-builds/build-plugins/#file-based-installation)
49+
in our docs.
50+
51+
## CLI Usage
52+
53+
If you'd like to build and deploy your project using the
54+
[Netlify CLI](https://docs.netlify.com/cli/get-started/), we recommend this
55+
workflow to manage git tracking plugin-generated files:
56+
57+
1. Make sure all your project's files are committed before running a build with
58+
the CLI
59+
2. Run any number of builds and deploys freely (i.e. `netlify build`,
60+
`netlify deploy --build`, `netlify deploy --prod`)
61+
3. Run `git stash --include-unstaged` to easily ignore plugin-generated files
62+
63+
It's important to note that the CLI may mix your project's source code and
64+
plugin-generated files; this is why we recommend committing all project source
65+
files before running CLI builds.
66+
67+
## Caveats
68+
69+
This plugin is currently in beta.
70+
71+
Right now:
72+
- it does not include out of the box monorepo support
73+
- it does not support Angular Universal prerendering

0 commit comments

Comments
 (0)