Skip to content

Commit 97b90cb

Browse files
authored
refactor: merge apps and libs into projects folder (#311)
* refactor: merge apps and libs into projects folder This aligns with the current Angular conventions for multi-project workspaces. * chore: simplify package.json file structure This aligns with the current recommendations for workspaces from the Angular documentation. * chore: remove `workspaces` from package.json Since we're using Angular 12, we can only use Node 14. This means we're stuck with NPM 6. Workspaces were only introduced in NPM 7. * ci: overwrite package-lock.json in CI Necessary because I cannot create a package-lock.json locally that's compatible with NPM 6.
1 parent 42006b1 commit 97b90cb

Some content is hidden

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

64 files changed

+3355
-24091
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ on:
88
jobs:
99
build-and-deploy:
1010
runs-on: ubuntu-latest
11-
needs: install
1211
steps:
1312
- uses: actions/checkout@v4
1413
- uses: actions/setup-node@v2
1514
with:
1615
node-version: '14.15'
17-
- run: npm ci
16+
- run: npm install
1817
- run: npm run build
1918
- name: Publish to npm
2019
env:

.github/workflows/test-and-build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ on:
77
branches: ['master']
88

99
jobs:
10-
build:
10+
test-and-build:
1111
runs-on: ubuntu-latest
12-
1312
steps:
1413
- uses: actions/checkout@v4
1514
- uses: actions/setup-node@v4
1615
with:
1716
node-version: '14.15'
1817
cache: 'npm'
19-
- run: npm ci
18+
- run: npm install
2019
- run: npm run build
2120
- name: Run tests
2221
run: npm run test -- --ci --coverage --reporters default --reporters jest-junit

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"editor.formatOnSave": true,
33
"[typescript]": {
44
"editor.codeActionsOnSave": {
5-
"source.fixAll.tslint": true
5+
"source.fixAll.tslint": "explicit"
66
}
77
},
88
"git.rebaseWhenSync": true

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
MIT License
44

5-
Copyright (c) 2018 Gabriel Sperrer
5+
Copyright (c) 2024 Gabriel Sperrer
66

77
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
88

angular.json

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,32 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3-
"schematics": {
4-
"@schematics/angular:component": {
5-
"style": "scss"
6-
}
7-
},
83
"version": 1,
9-
"newProjectRoot": "apps",
4+
"newProjectRoot": "projects",
105
"projects": {
116
"angular-google-charts": {
12-
"root": "libs/angular-google-charts",
13-
"sourceRoot": "libs/angular-google-charts/src",
7+
"root": "projects/angular-google-charts",
8+
"sourceRoot": "projects/angular-google-charts/src",
149
"projectType": "library",
1510
"prefix": "lib",
1611
"architect": {
1712
"build": {
1813
"builder": "@angular-devkit/build-angular:ng-packagr",
1914
"options": {
20-
"tsConfig": "libs/angular-google-charts/tsconfig.lib.json",
21-
"project": "libs/angular-google-charts/ng-package.json"
15+
"tsConfig": "projects/angular-google-charts/tsconfig.lib.json",
16+
"project": "projects/angular-google-charts/ng-package.json"
2217
},
2318
"configurations": {
2419
"production": {
25-
"project": "libs/angular-google-charts/ng-package.prod.json",
26-
"tsConfig": "libs/angular-google-charts/tsconfig.lib.prod.json"
20+
"project": "projects/angular-google-charts/ng-package.prod.json",
21+
"tsConfig": "projects/angular-google-charts/tsconfig.lib.prod.json"
2722
}
2823
}
2924
},
3025
"test": {
3126
"builder": "@angular-builders/jest:run",
3227
"options": {
3328
"configPath": "jest.config.js",
34-
"projects": ["libs/angular-google-charts"],
29+
"projects": ["projects/angular-google-charts"],
3530
"coverageDirectory": "../../coverage"
3631
}
3732
}
@@ -40,29 +35,29 @@
4035
"playground": {
4136
"projectType": "application",
4237
"schematics": {},
43-
"root": "apps/playground",
44-
"sourceRoot": "apps/playground/src",
38+
"root": "projects/playground",
39+
"sourceRoot": "projects/playground/src",
4540
"prefix": "app",
4641
"architect": {
4742
"build": {
4843
"builder": "@angular-devkit/build-angular:browser",
4944
"options": {
5045
"aot": true,
5146
"outputPath": "dist/playground",
52-
"index": "apps/playground/src/index.html",
53-
"main": "apps/playground/src/main.ts",
54-
"polyfills": "apps/playground/src/polyfills.ts",
55-
"tsConfig": "apps/playground/tsconfig.app.json",
56-
"assets": ["apps/playground/src/favicon.ico", "apps/playground/src/assets"],
57-
"styles": ["apps/playground/src/styles.scss"],
47+
"index": "projects/playground/src/index.html",
48+
"main": "projects/playground/src/main.ts",
49+
"polyfills": "projects/playground/src/polyfills.ts",
50+
"tsConfig": "projects/playground/tsconfig.app.json",
51+
"assets": ["projects/playground/src/favicon.ico", "projects/playground/src/assets"],
52+
"styles": ["projects/playground/src/styles.scss"],
5853
"scripts": []
5954
},
6055
"configurations": {
6156
"production": {
6257
"fileReplacements": [
6358
{
64-
"replace": "apps/playground/src/environments/environment.ts",
65-
"with": "apps/playground/src/environments/environment.prod.ts"
59+
"replace": "projects/playground/src/environments/environment.ts",
60+
"with": "projects/playground/src/environments/environment.prod.ts"
6661
}
6762
],
6863
"optimization": true,

apps/playground/package.json

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

0 commit comments

Comments
 (0)