Skip to content

Commit 321cc38

Browse files
committed
fix(build): migrate to Angular CLI builder
Previously the build was done by custom build scripts that were following Angular Package Format closely. But keeping all dev dependencies was too much overhead - so now Angular CLI is taking care of building, testing and linting which simplifies maintenance a lot. This change should not introduce any breakcking changes.
1 parent 5e7c322 commit 321cc38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+21095
-11501
lines changed

.appveyor.yml

+24-24
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
environment:
2-
nodejs_version: '11'
3-
4-
matrix:
5-
fast_finish: true
6-
7-
skip_tags: true
8-
9-
install:
10-
- ps: Install-Product node $env:nodejs_version
11-
- yarn install --frozen-lockfile --non-interactive
12-
13-
test_script:
14-
- node --version
15-
- yarn --version
16-
- yarn build
17-
- yarn ci
18-
19-
build: off
20-
deploy: off
21-
22-
cache:
23-
- node_modules
24-
- "%LOCALAPPDATA%\\Yarn"
1+
environment:
2+
nodejs_version: '12'
3+
4+
matrix:
5+
fast_finish: true
6+
7+
skip_tags: true
8+
9+
install:
10+
- ps: Install-Product node $env:nodejs_version
11+
- npm install
12+
13+
test_script:
14+
- node --version
15+
- npm run build
16+
- npm run lint
17+
- npm run test:ci
18+
- npm run coverage:check
19+
20+
build: off
21+
deploy: off
22+
23+
cache:
24+
- node_modules

.codeclimate.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
engines:
2-
duplication:
3-
enabled: true
4-
config:
5-
languages:
6-
- javascript
7-
tslint:
8-
enabled: true
9-
fixme:
10-
enabled: true
11-
ratings:
12-
paths:
13-
- 'src/**/*.ts'
14-
exclude_patterns:
15-
- '**.*'
16-
- '!src/dynamic/**/*.ts'
1+
engines:
2+
duplication:
3+
enabled: true
4+
config:
5+
languages:
6+
- javascript
7+
tslint:
8+
enabled: true
9+
fixme:
10+
enabled: true
11+
ratings:
12+
paths:
13+
- 'projects/ng-dynamic-component/src/lib/**/*.ts'
14+
exclude_patterns:
15+
- '**.*'
16+
- '!projects/ng-dynamic-component/src/lib/**/*.ts'

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Editor configuration, see http://editorconfig.org
1+
# Editor configuration, see https://editorconfig.org
22
root = true
33

44
[*]

.gitignore

+44-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,46 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
17+
# IDEs and editors
18+
/.idea
19+
.project
20+
.classpath
21+
.c9/
22+
*.launch
23+
.settings/
24+
*.sublime-workspace
25+
26+
# IDE - VSCode
127
.vscode/*
2-
.idea/*
328
!.vscode/settings.json
4-
node_modules/*
5-
dist/*
6-
compiled/*
7-
coverage/*
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
.history/*
33+
34+
# misc
35+
/.sass-cache
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
npm-debug.log
40+
yarn-error.log
41+
testem.log
42+
/typings
43+
44+
# System Files
45+
.DS_Store
46+
Thumbs.db

.npmignore

-12
This file was deleted.

.prettierrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"$schema": "http://json.schemastore.org/prettierrc",
33
"singleQuote": true,
44
"trailingComma": "all",
5-
"bracketSpacing": true
5+
"bracketSpacing": true,
6+
"endOfLine": "lf"
67
}

.releaserc

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"branches": ["master"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
[
7+
"@semantic-release/changelog",
8+
{
9+
"changelogFile": "CHANGELOG.md",
10+
"changelogTitle": "# ng-dynamic-component - Changelog"
11+
}
12+
],
13+
[
14+
"@semantic-release/npm",
15+
{
16+
"pkgRoot": "dist/ng-dynamic-component",
17+
"tarballDir": "dist"
18+
}
19+
],
20+
[
21+
"@semantic-release/git",
22+
{
23+
"message": "chore(release): release ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
24+
"assets": ["CHANGELOG.md"]
25+
}
26+
],
27+
[
28+
"@semantic-release/github",
29+
{
30+
"assets": "dist/*.tgz"
31+
}
32+
]
33+
]
34+
}

.travis.yml

+36-31
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
1-
sudo: required
2-
dist: trusty
3-
language: node_js
4-
cache:
5-
yarn: true
6-
notifications:
7-
email: false
8-
node_js: lts/*
9-
branches:
10-
only:
11-
- master
12-
- /^greenkeeper/.*$/
13-
stages:
14-
- test
15-
- name: deploy
16-
if: branch = master and type != pull_request
17-
jobs:
18-
include:
19-
- stage: test
20-
script:
21-
- yarn build
22-
- yarn ci
23-
- yarn test:report
24-
- stage: release
25-
node_js: lts/*
26-
script: skip
27-
deploy:
28-
provider: script
29-
skip_cleanup: true
30-
script:
31-
- yarn semantic-release
1+
sudo: required
2+
dist: trusty
3+
language: node_js
4+
cache:
5+
yarn: true
6+
notifications:
7+
email: false
8+
node_js: lts/*
9+
branches:
10+
only:
11+
- master
12+
- /^greenkeeper/.*$/
13+
stages:
14+
- test
15+
- name: deploy
16+
if: branch = master and type != pull_request
17+
jobs:
18+
include:
19+
- stage: test
20+
script:
21+
- npm run build
22+
- npm run format:check
23+
- npm run lint
24+
- npm run test:ci
25+
- npm run coverage:check
26+
- npm run test:report
27+
- stage: release
28+
node_js: lts/*
29+
script: skip
30+
deploy:
31+
provider: script
32+
skip_cleanup: true
33+
script:
34+
- npm run build
35+
- npm run pack
36+
- npm run semantic-release

.vscode/launch.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "attach",
10+
"name": "Attach by Process ID",
11+
"processId": "${command:PickProcess}"
12+
}
13+
]
14+
}

.vscode/settings.json

+3-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
{
2-
"typescript.tsdk": "node_modules\\typescript\\lib",
3-
"workbench.colorCustomizations": {
4-
"activityBar.background": "#081f6b",
5-
"activityBar.foreground": "#e7e7e7",
6-
"activityBar.inactiveForeground": "#e7e7e799",
7-
"activityBarBadge.background": "#b20d34",
8-
"activityBarBadge.foreground": "#e7e7e7",
9-
"titleBar.activeBackground": "#0c2d9a",
10-
"titleBar.inactiveBackground": "#0c2d9a99",
11-
"titleBar.activeForeground": "#e7e7e7",
12-
"titleBar.inactiveForeground": "#e7e7e799"
13-
}
14-
}
1+
{
2+
"typescript.tsdk": "node_modules\\typescript\\lib"
3+
}

CODE_OF_CONDUCT.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
88

99
Examples of behavior that contributes to creating a positive environment include:
1010

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
1616

1717
Examples of unacceptable behavior by participants include:
1818

19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
21-
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
2424

2525
## Our Responsibilities
2626

angular.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"ng-dynamic-component": {
7+
"projectType": "library",
8+
"root": "projects/ng-dynamic-component",
9+
"sourceRoot": "projects/ng-dynamic-component/src",
10+
"prefix": "ndc",
11+
"architect": {
12+
"build": {
13+
"builder": "@angular-devkit/build-ng-packagr:build",
14+
"options": {
15+
"tsConfig": "projects/ng-dynamic-component/tsconfig.lib.json",
16+
"project": "projects/ng-dynamic-component/ng-package.json"
17+
}
18+
},
19+
"test": {
20+
"builder": "@angular-builders/jest:run",
21+
"options": {}
22+
},
23+
"lint": {
24+
"builder": "@angular-devkit/build-angular:tslint",
25+
"options": {
26+
"tsConfig": [
27+
"projects/ng-dynamic-component/tsconfig.lib.json",
28+
"projects/ng-dynamic-component/tsconfig.spec.json"
29+
],
30+
"exclude": ["**/node_modules/**"]
31+
}
32+
}
33+
}
34+
}
35+
},
36+
"defaultProject": "ng-dynamic-component"
37+
}

0 commit comments

Comments
 (0)