Skip to content

Commit 42b64c6

Browse files
committed
feat: add basic support for angular universal alongside serverless schematic
1 parent 1f3a720 commit 42b64c6

16 files changed

+571
-52
lines changed

.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ module.exports = {
1616
'node/global-require': 0,
1717
'node/prefer-global/process': 0,
1818
'no-magic-numbers': 0,
19+
'no-negated-condition': 0,
20+
'no-param-reassign': 0,
1921
'no-promise-executor-return': 0,
2022
'no-prototype-builtins': 0,
2123
'no-shadow': 0,
2224
'no-unused-vars': 0,
25+
'no-use-before-define': 0,
2326
'prefer-regex-literals': 0,
2427
'promise/prefer-await-to-callbacks': 0,
28+
'require-await': 0,
29+
'unicorn/consistent-destructuring': 0,
2530
'unicorn/filename-case': 0,
2631
'unicorn/no-array-push-push': 0,
2732
},

README.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Essential Angular Serverless Plugin
44

5-
This build plugin is a utility for supporting Angular Universal on Netlify. This plugin will be installed by running a Netlify-specific Angular schematic, but it can also be installed manually.
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.
66

77
## Table of Contents
88

@@ -11,25 +11,22 @@ This build plugin is a utility for supporting Angular Universal on Netlify. This
1111
## Installation and Configuration
1212

1313
### Angular Schematic
14-
- TBD
1514

16-
### Manual Installation
17-
18-
1. Create a `netlify.toml` in the root of your project. Your file should include
19-
the plugins section below:
20-
21-
```toml
22-
TBD
15+
```bash
16+
ng add netlify-schematics
2317
```
2418

25-
2. From your project's base directory, add this plugin to `dependencies` in
26-
`package.json`.
27-
2819
```bash
29-
# yarn add --save @netlify/plugin-angular-serverless
30-
npm install --save @netlify/plugin-angular-serverless
20+
ng generate netlify-schematics:netlify-serverless`
3121
```
3222

33-
Read more about
34-
[file-based plugin installation](https://docs.netlify.com/configure-builds/build-plugins/#file-based-installation)
35-
in our docs.
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:
24+
25+
```toml
26+
[build]
27+
command = "ng build --configuration production && ng run {projectName}:serverless:production"
28+
publish = "dist/netlify-serverless/browser"
29+
30+
[[plugins]]
31+
package = "@netlify/plugin-angular-serverless"
32+
```

0 commit comments

Comments
 (0)