Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Commit 022ce61

Browse files
build: upgrade to Angular v11 and switch to ng-packagr (#118)
Co-authored-by: Alan Agius <[email protected]>
1 parent f11c8ff commit 022ce61

24 files changed

+10670
-15551
lines changed

.circleci/config.yml

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
# Cache key for CircleCI. We want to invalidate the cache whenever the npm shrinkwrap
22
# changed.
3-
var_1: &cache_key preboot-{{ checksum "npm-shrinkwrap.json" }}
3+
var_1: &cache_key preboot-v1-{{ checksum "yarn.lock" }}
44
# Use the CircleCI browsers image that comes with NodeJS installed
5-
var_2: &default_docker_image circleci/node:10.12-browsers
5+
var_2: &docker_image cimg/node:10.20
66

7-
# Settings common to each job
8-
var_3: &job_defaults
9-
working_directory: ~/ng
10-
docker:
11-
- image: *default_docker_image
7+
# Executor Definitions
8+
# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-executors
9+
executors:
10+
action-executor:
11+
docker:
12+
- image: *docker_image
13+
working_directory: ~/ng
14+
15+
# Workspace initially persisted by the `setup` job.
16+
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
17+
# https://circleci.com/blog/deep-diving-into-circleci-workspaces/
18+
var_3: &workspace_location .
1219

1320
# Job step for checking out the source code from GitHub. This also ensures that the source code
1421
# is rebased on top of master.
@@ -30,7 +37,7 @@ var_6: &save_cache
3037
save_cache:
3138
key: *cache_key
3239
paths:
33-
- "node_modules"
40+
- ~/.cache/yarn
3441

3542
# Job step that ensures that the node module dependencies are installed and up-to-date. We use
3643
# Yarn with the frozen lockfile option in order to make sure that lock file and package.json are
@@ -43,58 +50,54 @@ var_7: &yarn_install
4350
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
4451
var_8: &attach_release_output
4552
attach_workspace:
46-
at: dist/
53+
at: *workspace_location
54+
4755

4856

4957
# -----------------------------
5058
# Container version of CircleCI
5159
# -----------------------------
52-
version: 2
60+
version: 2.1
61+
62+
orbs:
63+
browser-tools: circleci/[email protected]
5364

5465
# -----------------------------------------------------------------------------------------
5566
# Job definitions. Jobs which are defined just here, will not run automatically. Each job
5667
# must be part of a workflow definition in order to run for PRs and push builds.
5768
# -----------------------------------------------------------------------------------------
5869
jobs:
5970

60-
build:
61-
<<: *job_defaults
71+
build_and_test:
72+
executor: action-executor
6273
steps:
6374
- *checkout_code
6475
- *restore_cache
6576
- *yarn_install
6677

67-
- run: npm run build
78+
- run: yarn build
79+
80+
- browser-tools/install-chrome
81+
- run: yarn test:once
6882

6983
# Store the release output in the workspace storage. This means that other jobs
7084
# in the same workflow can attach the release output to their job.
7185
- persist_to_workspace:
72-
root: dist
86+
root: *workspace_location
7387
paths:
74-
- "*"
75-
- "**/*"
76-
77-
- *save_cache
78-
79-
test:
80-
<<: *job_defaults
81-
steps:
82-
- *checkout_code
83-
- *restore_cache
84-
- *yarn_install
85-
86-
- run: npm run test:once
88+
- ./dist
8789

8890
- *save_cache
8991

9092
e2e:
91-
<<: *job_defaults
93+
executor: action-executor
9294
steps:
95+
- browser-tools/install-chrome
9396
- *checkout_code
9497
- *restore_cache
9598
- *attach_release_output
9699

97-
- run: npm run e2e
100+
- run: yarn e2e
98101

99102
- *save_cache
100103

@@ -107,8 +110,7 @@ workflows:
107110

108111
build_and_test:
109112
jobs:
110-
- build
111-
- test
113+
- build_and_test
112114
- e2e:
113115
requires:
114-
- build
116+
- build_and_test

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ logs
66
.DS_Store
77
**/.DS_Store
88

9-
package-lock.json
9+
/npm-shrinkwrap.json
1010

1111
dist/
12+
dist-tarball/
1213
node_modules/
1314
out-tsc/
1415
debug.log

.npmignore

Lines changed: 0 additions & 19 deletions
This file was deleted.

build.js

Lines changed: 0 additions & 191 deletions
This file was deleted.

0 commit comments

Comments
 (0)