Skip to content

Commit 69ce0bf

Browse files
Ivy (#15)
* bump angular version * bump jasmine+karma * add universal * chore(deps): add stylelint and commitlint * chore(build): fix it * Travis -> gh Actions (#16) * feat(ci): add github workflow; remove travis * chore(docs): update * chore(scripts): remove coveralls for travis * ci(coveralls): coverage without subfolders Co-authored-by: Roman Sedov <darragon-nn@yandex.ru>
1 parent b7a00c1 commit 69ce0bf

27 files changed

+15108
-8684
lines changed

.github/workflows/ci.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI of all packages
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Use Node.js
11+
uses: actions/setup-node@v1
12+
with:
13+
node-version: '12.x'
14+
- name: Cache Node.js modules
15+
uses: actions/cache@v2
16+
with:
17+
path: ~/.npm
18+
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
19+
restore-keys: |
20+
${{ runner.OS }}-node-
21+
${{ runner.OS }}-
22+
- name: Install dependencies
23+
run: npm ci
24+
- name: CI checks
25+
run: |
26+
npm run build
27+
npm run lint
28+
npm run test
29+
- name: Coveralls
30+
uses: coverallsapp/github-action@master
31+
with:
32+
github-token: ${{ secrets.GITHUB_TOKEN }}

.stylelintrc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": ["@tinkoff/linters/stylelint/bases/prettier.stylelint.json"],
3+
"rules": {
4+
"value-keyword-case": null,
5+
"selector-type-no-unknown": [
6+
true,
7+
{
8+
"ignore": ["custom-elements"],
9+
"ignoreTypes": ["/^/deep/"]
10+
}
11+
]
12+
}
13+
}

.travis.yml

-9
This file was deleted.

README.md

+8-12
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,10 @@
4242
2. This project has Angular Universal —
4343
you can easily test your library with SSR and Prerender:
4444

45-
`npm run start:ssr` or `npm run start:prerender`
45+
`npm run dev:ssr` or `npm run prerender`
4646

47-
3. CI and code coverage are ready, configured to use
48-
[Travis](http://travis-ci.org/) and [Coveralls](https://coveralls.io).
49-
Just authorize on [Travis](http://travis-ci.org/) with your Github account
50-
and enable your repository and do the same on [Coveralls](https://coveralls.io).
51-
If you want to have more than one library in your workspace add
52-
`COVERALLS_PARALLEL=true` to [Travis](http://travis-ci.org/) Environmental variables.
47+
3. CI and code coverage are ready, Github Action checks that packages build, test and lint correctly.
48+
It also sends test results to [Coveralls](https://coveralls.io).
5349

5450
4. Precommit checks, prettier, linter and all that jazz is there.
5551

@@ -61,15 +57,15 @@
6157
6. You can add more libraries using the same `npm run add` command to create a whole Angular Workspace
6258
with multiple libraries. Versioning and publishing is configured that they are released simultaneously like Angular packages.
6359

64-
## Angular 8
60+
## View Engine
6561

66-
Don't need your library to support Angular 7 and below? Run following command to update packages for Angular 8+:
62+
This starter uses Angular 9. This way your libraries will be supported across all Angular versions in Ivy world.
63+
If you need to support older versions of Angular like 6 and above, you can use tag `view-engine` of this repository as
64+
your starting point as it is running Angular 7.
6765

68-
ng update @angular/cli @angular/compiler-cli @angular/core @nguniversal/common tsickle
69-
7066
## Badge
7167

72-
Show that your project is based off of our starter
68+
Show that your project is based off of our starter
7369

7470
[![angular-open-source-starter](https://img.shields.io/badge/made%20with-angular--open--source--starter-d81676?logo=angular)](https://github.com/TinkoffCreditSystems/angular-open-source-starter)
7571

angular.json

+45-8
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
},
2828
"configurations": {
2929
"production": {
30+
"fileReplacements": [
31+
{
32+
"replace": "projects/demo/src/environments/environment.ts",
33+
"with": "projects/demo/src/environments/environment.prod.ts"
34+
}
35+
],
3036
"optimization": true,
3137
"outputHashing": "all",
3238
"sourceMap": false,
@@ -57,14 +63,6 @@
5763
}
5864
}
5965
},
60-
"server": {
61-
"builder": "@angular-devkit/build-angular:server",
62-
"options": {
63-
"outputPath": "dist/demo/server",
64-
"main": "projects/demo/src/main.server.ts",
65-
"tsConfig": "projects/demo/tsconfig.server.json"
66-
}
67-
},
6866
"test": {
6967
"builder": "@angular-devkit/build-angular:karma",
7068
"options": {
@@ -81,6 +79,45 @@
8179
"tsConfig": ["tsconfig.json"],
8280
"exclude": ["**/node_modules/**"]
8381
}
82+
},
83+
"server": {
84+
"builder": "@angular-devkit/build-angular:server",
85+
"options": {
86+
"outputPath": "dist/demo/server",
87+
"main": "projects/demo/server.ts",
88+
"tsConfig": "projects/demo/tsconfig.server.json"
89+
},
90+
"configurations": {
91+
"production": {
92+
"outputHashing": "media",
93+
"sourceMap": false,
94+
"optimization": true
95+
}
96+
}
97+
},
98+
"serve-ssr": {
99+
"builder": "@nguniversal/builders:ssr-dev-server",
100+
"options": {
101+
"browserTarget": "demo:build",
102+
"serverTarget": "demo:server"
103+
},
104+
"configurations": {
105+
"production": {
106+
"browserTarget": "demo:build:production",
107+
"serverTarget": "demo:server:production"
108+
}
109+
}
110+
},
111+
"prerender": {
112+
"builder": "@nguniversal/builders:prerender",
113+
"options": {
114+
"browserTarget": "demo:build:production",
115+
"serverTarget": "demo:server:production",
116+
"routes": ["/"]
117+
},
118+
"configurations": {
119+
"production": {}
120+
}
84121
}
85122
}
86123
}

commitlint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {extends: ['@commitlint/config-conventional']};

0 commit comments

Comments
 (0)