Skip to content

Commit df526d7

Browse files
committed
circleci: build with npm link
1 parent ce10bbc commit df526d7

File tree

7 files changed

+58
-26
lines changed

7 files changed

+58
-26
lines changed

.circleci/config.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,29 @@ jobs:
44
build:
55

66
environment:
7-
GITHUB_ORG: https://GH_TOKEN@github.com/angular-schule
7+
GITHUB_ORG: https://github.com/angular-schule
88
GITHUB_NAME: The Buildbot
99
GITHUB_EMAIL: [email protected]
1010
NAME: angular-cli-ghpages
1111

1212
docker:
13-
- image: circleci/node:10-browsers
13+
- image: circleci/node:12-browsers
1414
steps:
1515
- checkout
1616

17-
1817
- restore_cache:
19-
key: dependency-cache-{{ checksum "package.json" }}-{{ checksum "mini-testdrive/package.json" }}
20-
- run: npm i --silent
21-
- run: cd mini-testdrive && npm i --silent
18+
key: dependency-cache-{{ checksum "package.json" }}-{{ checksum "src/package.json" }}
19+
- run: cd src && npm i --silent
2220
- save_cache:
23-
key: dependency-cache-{{ checksum "package.json" }}-{{ checksum "mini-testdrive/package.json" }}
21+
key: dependency-cache-{{ checksum "package.json" }}-{{ checksum "src/package.json" }}
2422
paths:
25-
- node_modules
26-
- mini-testdrive/node_modules
27-
28-
29-
- run: cd mini-testdrive && npm run build
30-
- run: chmod +x bin/angular-cli-ghpages
31-
- run: cd mini-testdrive && ../angular-cli-ghpages --repo "$GITHUB_ORG/$NAME.git" --name "$GITHUB_NAME" --email "$GITHUB_EMAIL" --dir=dist/mini-testdrive --cname=angular-cli-ghpages.angular.schule
32-
33-
branches:
34-
only:
35-
- XXX-disable-build-for-now-XXX
23+
- src/node_modules
24+
- run: cd src && npm run build
25+
- run: cd src && npm run test
26+
- run: cd src/dist && npm link
27+
28+
- run: npm install -g @angular/cli@next
29+
- run: ng new your-angular-project --defaults
30+
- run: cd new your-angular-project && npm link angular-cli-ghpages
31+
- run: cd new your-angular-project && ng add angular-cli-ghpages
32+
- run: cd new your-angular-project && ng deploy --repo="$GITHUB_ORG/$NAME.git" --name="$GITHUB_NAME" --email="$GITHUB_EMAIL" --cname=angular-cli-ghpages.angular.schule

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ nvim/swaps
2222
nvim/colors
2323
dist
2424

25-
/src/angular-testdrive/404.html
26-
/src/angular-testdrive/CNAME
25+
/src/mini-testdrive/404.html
26+
/src/mini-testdrive/CNAME
2727
.angulardoc.json

.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
"type": "node",
99
"request": "launch",
1010
"name": "Launch Standalone Program",
11-
//"cwd": "${workspaceRoot}",
11+
"cwd": "${workspaceRoot}/src",
1212
"program": "${workspaceFolder}/src/dist/angular-cli-ghpages",
1313
"outFiles": [
1414
"${workspaceFolder}/src/dist/**/*.js"
1515
],
1616
"args": [
1717
//"--no-silent",
1818
//"--dry-run",
19-
"--dir=/src/mini-testdrive",
19+
"--dir=mini-testdrive",
2020
"--cname=angular-cli-ghpages.angular.schule"
2121
],
2222
"stopOnEntry": true,
2323
"sourceMaps": true,
24-
"preLaunchTask": "npm: build",
24+
"preLaunchTask": "npm build",
2525
}
2626
]
2727
}

.vscode/tasks.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "build",
9+
"path": "src/",
10+
"label": "npm build"
11+
}
12+
]
13+
}

docs/README_contributors.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
tl;dr – execute this:
66

77
```
8+
cd src
89
npm i
910
npm run build
1011
npm test
@@ -50,6 +51,7 @@ Use the following instructions to make `angular-cli-ghpages` available locally v
5051
2. Install the dependencies
5152

5253
```sh
54+
cd src
5355
npm install
5456
```
5557

@@ -106,5 +108,25 @@ To run the tests:
106108

107109
```sh
108110
cd angular-cli-ghpages
111+
cd src
109112
npm test
110113
```
114+
115+
116+
117+
118+
119+
## Testing the standalone CLI
120+
121+
To quickly test the file `engine.ts` directly, the standalone mode is the best option.
122+
Use VSCode and debug the task `Launch Standalone Program"`.
123+
124+
125+
## Publish to npm
126+
127+
```
128+
cd angular-cli-ghpages
129+
cd src
130+
npm run build
131+
npm run test
132+
```

src/angular-cli-ghpages

100755100644
File mode changed.

src/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-cli-ghpages",
3-
"version": "0.6.0",
3+
"version": "0.6.0-rc.0",
44
"description": "Deployment from the Angular CLI to GitHub pages (or any other branch on any other remote)",
55
"main": "index.js",
66
"bin": {
@@ -34,8 +34,8 @@
3434
"angular-cli-github-pages"
3535
],
3636
"author": {
37-
"name": "Angular.Schule Team",
38-
"email": "[email protected]"
37+
"name": "Johannes Hoppe",
38+
"email": "[email protected]"
3939
},
4040
"contributors": [
4141
"Minko Gechev <[email protected]>"

0 commit comments

Comments
 (0)