Skip to content

Commit 7705197

Browse files
upgrade for Angular 9
1 parent 6108dec commit 7705197

File tree

6 files changed

+7
-2177
lines changed

6 files changed

+7
-2177
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: node_js
22
node_js:
3-
- "9"
3+
- "10"
4+
- "12"
45
dist: trusty
56
sudo: required
67

README.md

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ MIT
4545
1. Move to src and run the below command
4646

4747
```sh
48-
yarn install
48+
npm i
4949
```
5050

5151
2. Run the below command to build the package
5252

5353
```sh
54-
yarn build
54+
npm run build
5555
```
5656

5757
3. run the below command to link the package
@@ -60,42 +60,6 @@ yarn build
6060
npm link
6161
```
6262

63-
## To test pacakge
64-
65-
1. Move to builder-test and run the below command
66-
67-
```sh
68-
yarn install
69-
```
70-
71-
2. Link the package
72-
73-
```sh
74-
npm link @netlify-builder/deploy
75-
```
76-
77-
3. Provide below config in angular.json
78-
```json
79-
"deploy": {
80-
"builder": "@netlify-builder/deploy:deploy",
81-
"options": {
82-
"command": "deploy",
83-
"outputPath": "dist/builder-test",
84-
"netlifyToken": "[tokenValue]",
85-
"siteId": "[siteId]",
86-
"args": [
87-
"src/main.ts"
88-
]
89-
}
90-
}
91-
```
92-
93-
4. Test the command
94-
95-
```sh
96-
ng run builder-test:deploy
97-
```
98-
9963
## Link to [Step by Step Guide](https://www.netlify.com/blog/2019/09/17/using-the-angular-builder-for-netlify/)
10064

10165
## Contributors ✨

src/ng-add/index.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
import { Rule, SchematicContext, SchematicsException, Tree, chain } from '@angular-devkit/schematics';
22
import { experimental, JsonParseMode, parseJson } from '@angular-devkit/core';
3-
import {
4-
addPackageJsonDependency,
5-
NodeDependency,
6-
NodeDependencyType
7-
} from 'schematics-utilities';
8-
9-
function addPackageJsonDependencies(): Rule {
10-
return (host: Tree, context: SchematicContext) => {
11-
const dependencies: NodeDependency[] = [
12-
{ type: NodeDependencyType.Default, version: '~2.0.0', name: '@netlify-builder/deploy' }
13-
];
14-
15-
dependencies.forEach(dependency => {
16-
addPackageJsonDependency(host, dependency);
17-
context.logger.log('info', `✅️ Added "${dependency.name}" into ${dependency.type}`);
18-
});
19-
20-
return host;
21-
};
22-
}
233

244
function getWorkspace(host: Tree): { path: string; workspace: experimental.workspace.WorkspaceSchema } {
255
const possibleFiles = ['/angular.json', '/.angular.json'];
@@ -119,8 +99,7 @@ export function netlifyBuilder(options: NgAddOptions): Rule {
11999
export default function (options: NgAddOptions): Rule {
120100
return chain(
121101
[
122-
netlifyBuilder(options),
123-
addPackageJsonDependencies()
102+
netlifyBuilder(options)
124103
]
125104
)
126105
}

src/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netlify-builder/deploy",
3-
"version": "2.0.3",
3+
"version": "3.0.0",
44
"description": "A Netlify builder schematics for deployment",
55
"main": "index.js",
66
"builders": "./builders.json",

0 commit comments

Comments
 (0)