Skip to content

Commit

Permalink
fix(build): migrate to Angular CLI builder
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gund committed Jan 29, 2020
1 parent 5e7c322 commit 321cc38
Show file tree
Hide file tree
Showing 61 changed files with 21,095 additions and 11,501 deletions.
48 changes: 24 additions & 24 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
environment:
nodejs_version: '11'

matrix:
fast_finish: true

skip_tags: true

install:
- ps: Install-Product node $env:nodejs_version
- yarn install --frozen-lockfile --non-interactive

test_script:
- node --version
- yarn --version
- yarn build
- yarn ci

build: off
deploy: off

cache:
- node_modules
- "%LOCALAPPDATA%\\Yarn"
environment:
nodejs_version: '12'

matrix:
fast_finish: true

skip_tags: true

install:
- ps: Install-Product node $env:nodejs_version
- npm install

test_script:
- node --version
- npm run build
- npm run lint
- npm run test:ci
- npm run coverage:check

build: off
deploy: off

cache:
- node_modules
32 changes: 16 additions & 16 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
engines:
duplication:
enabled: true
config:
languages:
- javascript
tslint:
enabled: true
fixme:
enabled: true
ratings:
paths:
- 'src/**/*.ts'
exclude_patterns:
- '**.*'
- '!src/dynamic/**/*.ts'
engines:
duplication:
enabled: true
config:
languages:
- javascript
tslint:
enabled: true
fixme:
enabled: true
ratings:
paths:
- 'projects/ng-dynamic-component/src/lib/**/*.ts'
exclude_patterns:
- '**.*'
- '!projects/ng-dynamic-component/src/lib/**/*.ts'
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Editor configuration, see http://editorconfig.org
# Editor configuration, see https://editorconfig.org
root = true

[*]
Expand Down
49 changes: 44 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,46 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
.idea/*
!.vscode/settings.json
node_modules/*
dist/*
compiled/*
coverage/*
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
12 changes: 0 additions & 12 deletions .npmignore

This file was deleted.

3 changes: 2 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"$schema": "http://json.schemastore.org/prettierrc",
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true
"bracketSpacing": true,
"endOfLine": "lf"
}
34 changes: 34 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md",
"changelogTitle": "# ng-dynamic-component - Changelog"
}
],
[
"@semantic-release/npm",
{
"pkgRoot": "dist/ng-dynamic-component",
"tarballDir": "dist"
}
],
[
"@semantic-release/git",
{
"message": "chore(release): release ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
"assets": ["CHANGELOG.md"]
}
],
[
"@semantic-release/github",
{
"assets": "dist/*.tgz"
}
]
]
}
67 changes: 36 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
sudo: required
dist: trusty
language: node_js
cache:
yarn: true
notifications:
email: false
node_js: lts/*
branches:
only:
- master
- /^greenkeeper/.*$/
stages:
- test
- name: deploy
if: branch = master and type != pull_request
jobs:
include:
- stage: test
script:
- yarn build
- yarn ci
- yarn test:report
- stage: release
node_js: lts/*
script: skip
deploy:
provider: script
skip_cleanup: true
script:
- yarn semantic-release
sudo: required
dist: trusty
language: node_js
cache:
yarn: true
notifications:
email: false
node_js: lts/*
branches:
only:
- master
- /^greenkeeper/.*$/
stages:
- test
- name: deploy
if: branch = master and type != pull_request
jobs:
include:
- stage: test
script:
- npm run build
- npm run format:check
- npm run lint
- npm run test:ci
- npm run coverage:check
- npm run test:report
- stage: release
node_js: lts/*
script: skip
deploy:
provider: script
skip_cleanup: true
script:
- npm run build
- npm run pack
- npm run semantic-release
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach by Process ID",
"processId": "${command:PickProcess}"
}
]
}
17 changes: 3 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib",
"workbench.colorCustomizations": {
"activityBar.background": "#081f6b",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#b20d34",
"activityBarBadge.foreground": "#e7e7e7",
"titleBar.activeBackground": "#0c2d9a",
"titleBar.inactiveBackground": "#0c2d9a99",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveForeground": "#e7e7e799"
}
}
{
"typescript.tsdk": "node_modules\\typescript\\lib"
}
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo

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

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

Examples of unacceptable behavior by participants include:

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

## Our Responsibilities

Expand Down
37 changes: 37 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ng-dynamic-component": {
"projectType": "library",
"root": "projects/ng-dynamic-component",
"sourceRoot": "projects/ng-dynamic-component/src",
"prefix": "ndc",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/ng-dynamic-component/tsconfig.lib.json",
"project": "projects/ng-dynamic-component/ng-package.json"
}
},
"test": {
"builder": "@angular-builders/jest:run",
"options": {}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ng-dynamic-component/tsconfig.lib.json",
"projects/ng-dynamic-component/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"defaultProject": "ng-dynamic-component"
}

0 comments on commit 321cc38

Please sign in to comment.