Skip to content

Commit b6d4937

Browse files
committed
feat(router): setup scaffold
1 parent 1c7eefc commit b6d4937

10 files changed

Lines changed: 110 additions & 0 deletions

File tree

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"format": "prettier --write \"{*,packages/**/*}.{html,css,less,scss,sass,ts,js,json,md}\" && eslint \"packages/**/*.ts\" --cache --fix"
1212
},
1313
"private": true,
14+
"dependencies": {
15+
"tslib": "^2.3.0"
16+
},
1417
"devDependencies": {
1518
"@angular-devkit/build-angular": "^17.2.0",
1619
"@angular-devkit/core": "^17.2.0",

packages/router/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Router
2+
3+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.2.0.
4+
5+
## Code scaffolding
6+
7+
Run `ng generate component component-name --project router` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project router`.
8+
9+
> Note: Don't forget to add `--project router` or else it will be added to the default project in your `angular.json` file.
10+
11+
## Build
12+
13+
Run `ng build router` to build the project. The build artifacts will be stored in the `dist/` directory.
14+
15+
## Publishing
16+
17+
After building your library with `ng build router`, go to the dist folder `cd dist/router` and run `npm publish`.
18+
19+
## Running unit tests
20+
21+
Run `ng test router` to execute the unit tests via [Karma](https://karma-runner.github.io).
22+
23+
## Further help
24+
25+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

packages/router/ng-package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "../../dist/angularity/router",
4+
"lib": {
5+
"entryFile": "src/public-api.ts"
6+
}
7+
}

packages/router/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "@angularity/router",
3+
"version": "0.1.0",
4+
"peerDependencies": {
5+
"@angular/common": "^17.2.0",
6+
"@angular/core": "^17.2.0"
7+
},
8+
"dependencies": {
9+
"tslib": "^2.3.0"
10+
},
11+
"sideEffects": false
12+
}

packages/router/project.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "@angularity/router",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "library",
5+
"sourceRoot": "packages/router/src",
6+
"prefix": "lib",
7+
"targets": {
8+
"build": {
9+
"executor": "@angular-devkit/build-angular:ng-packagr",
10+
"options": {
11+
"project": "packages/router/ng-package.json"
12+
},
13+
"configurations": {
14+
"production": {
15+
"tsConfig": "packages/router/tsconfig.lib.prod.json"
16+
},
17+
"development": {
18+
"tsConfig": "packages/router/tsconfig.lib.json"
19+
}
20+
},
21+
"defaultConfiguration": "production"
22+
},
23+
"test": {
24+
"executor": "@angular-devkit/build-angular:karma",
25+
"options": {
26+
"tsConfig": "packages/router/tsconfig.spec.json",
27+
"polyfills": ["zone.js", "zone.js/testing"]
28+
}
29+
}
30+
}
31+
}

packages/router/src/public-api.ts

Whitespace-only changes.

packages/router/tsconfig.lib.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
2+
{
3+
"extends": "../../tsconfig.json",
4+
"compilerOptions": {
5+
"outDir": "../../out-tsc/lib",
6+
"declaration": true,
7+
"declarationMap": true,
8+
"inlineSources": true,
9+
"types": []
10+
},
11+
"exclude": ["**/*.spec.ts"]
12+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
2+
{
3+
"extends": "./tsconfig.lib.json",
4+
"compilerOptions": {
5+
"declarationMap": false
6+
},
7+
"angularCompilerOptions": {
8+
"compilationMode": "partial"
9+
}
10+
}

packages/router/tsconfig.spec.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
2+
{
3+
"extends": "../../tsconfig.json",
4+
"compilerOptions": {
5+
"outDir": "../../out-tsc/spec",
6+
"types": ["jasmine"]
7+
},
8+
"include": ["**/*.spec.ts", "**/*.d.ts"]
9+
}

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@angularity/endpoints": ["./dist/endpoints"],
2626
"@angularity/fire": ["./dist/fire"],
2727
"@angularity/forms": ["./dist/forms"],
28+
"@angularity/router": ["./dist/angularity/router"],
2829
"@angularity/theming": ["./dist/theming"],
2930
"@angularity/theming-material": ["./dist/theming-material"],
3031
},

0 commit comments

Comments
 (0)