Skip to content

Commit 7ccde24

Browse files
committed
Change: プラグインを Angular ライブラリ化
1 parent 9f5c7e2 commit 7ccde24

20 files changed

+4298
-8639
lines changed

.github/workflows/build-lib.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build lib
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Install Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 16
18+
19+
- name: Install dependencies
20+
run: npm install
21+
env:
22+
CI: true
23+
24+
- name: Build module
25+
run: |
26+
REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')
27+
npm run ng build -- scully-plugin-esa
28+
- name: Upload library to library branch
29+
uses: JamesIves/github-pages-deploy-action@ba1486788b0490a235422264426c45848eac35c6
30+
with:
31+
branch: library
32+
folder: dist/scully-plugin-esa/

angular.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,37 @@
8282
}
8383
}
8484
}
85+
},
86+
"scully-plugin-esa": {
87+
"projectType": "library",
88+
"root": "projects/scully-plugin-esa",
89+
"sourceRoot": "projects/scully-plugin-esa/src",
90+
"prefix": "lib",
91+
"architect": {
92+
"build": {
93+
"builder": "@angular-devkit/build-angular:ng-packagr",
94+
"options": {
95+
"project": "projects/scully-plugin-esa/ng-package.json"
96+
},
97+
"configurations": {
98+
"production": {
99+
"tsConfig": "projects/scully-plugin-esa/tsconfig.lib.prod.json"
100+
},
101+
"development": {
102+
"tsConfig": "projects/scully-plugin-esa/tsconfig.lib.json"
103+
}
104+
},
105+
"defaultConfiguration": "production"
106+
},
107+
"test": {
108+
"builder": "@angular-devkit/build-angular:karma",
109+
"options": {
110+
"main": "projects/scully-plugin-esa/src/test.ts",
111+
"tsConfig": "projects/scully-plugin-esa/tsconfig.spec.json",
112+
"karmaConfig": "projects/scully-plugin-esa/karma.conf.js"
113+
}
114+
}
115+
}
85116
}
86117
},
87118
"defaultProject": "blog"

0 commit comments

Comments
 (0)