Skip to content

Commit c829299

Browse files
committed
feat: angular-devkit and initial generators
1 parent 9cf8bc4 commit c829299

Some content is hidden

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

60 files changed

+5770
-1462
lines changed

.eslintrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
"ignorePatterns": ["**/*"],
44
"plugins": ["@nx"],
55
"overrides": [
6+
{
7+
"files": "*.json",
8+
"parser": "jsonc-eslint-parser",
9+
"rules": {}
10+
},
611
{
712
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
813
"parserOptions": {},

.verdaccio/config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# path to a directory with all packages
2+
storage: ../tmp/local-registry/storage
3+
4+
# a list of other known repositories we can talk to
5+
uplinks:
6+
npmjs:
7+
url: https://registry.npmjs.org/
8+
maxage: 60m
9+
10+
packages:
11+
'**':
12+
# give all users (including non-authenticated users) full access
13+
# because it is a local registry
14+
access: $all
15+
publish: $all
16+
unpublish: $all
17+
18+
# if package is not available locally, proxy requests to npm registry
19+
proxy: npmjs
20+
21+
# log settings
22+
logs:
23+
type: stdout
24+
format: pretty
25+
level: warn
26+
27+
publish:
28+
allow_offline: true # set offline to true to allow publish offline

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"eslint.validate": ["json"]
3+
}

nx.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
"@nx/eslint:lint": {
3939
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
4040
"cache": true
41+
},
42+
"@nx/js:tsc": {
43+
"cache": true,
44+
"dependsOn": ["^build"],
45+
"inputs": ["production", "^production"]
4146
}
4247
},
4348
"namedInputs": {
@@ -49,5 +54,10 @@
4954
"nxCloudAccessToken": "NWJjY2UzMjctM2Q2Yy00ODZlLWExYjktNzE3YTRmMzRmMWQwfHJlYWQ=",
5055
"parallel": 2,
5156
"useInferencePlugins": false,
52-
"defaultBase": "main"
57+
"defaultBase": "main",
58+
"release": {
59+
"version": {
60+
"preVersionCommand": "yarn nx run-many -t build"
61+
}
62+
}
5363
}

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"@nativescript/core": "~8.8.0",
4747
"@nativescript/theme": "~3.0.2",
4848
"@ngx-translate/core": "~15.0.0",
49+
"@nx/devkit": "19.7.4",
4950
"nativescript-fonticon": "~8.1.3",
5051
"rxjs": "^7.8.0",
5152
"zone.js": "~0.14.6"
@@ -70,8 +71,13 @@
7071
"@nx/jest": "19.7.4",
7172
"@nx/js": "19.7.4",
7273
"@nx/node": "19.7.4",
74+
"@nx/plugin": "19.7.4",
7375
"@nx/workspace": "19.7.4",
7476
"@schematics/angular": "18.2.4",
77+
"@swc-node/register": "~1.9.1",
78+
"@swc/cli": "~0.3.12",
79+
"@swc/core": "~1.5.7",
80+
"@swc/helpers": "~0.5.11",
7581
"@types/jasmine": "5.1.4",
7682
"@types/jest": "29.5.13",
7783
"@types/node": "^20.0.0",
@@ -107,7 +113,8 @@
107113
"ts-jest": "29.1.1",
108114
"ts-node": "10.9.2",
109115
"tslib": "^2.6.0",
110-
"typescript": "~5.5.0"
116+
"typescript": "~5.5.0",
117+
"verdaccio": "^5.0.4"
111118
},
112119
"xplat": {
113120
"prefix": "nativescript",
@@ -118,5 +125,8 @@
118125
"nx format:write --files",
119126
"nx affected:lint --fix --files"
120127
]
128+
},
129+
"nx": {
130+
"includedScripts": []
121131
}
122132
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
},
17+
{
18+
"files": ["*.json"],
19+
"parser": "jsonc-eslint-parser",
20+
"rules": {
21+
"@nx/dependency-checks": "error"
22+
}
23+
},
24+
{
25+
"files": ["./package.json", "./generators.json"],
26+
"parser": "jsonc-eslint-parser",
27+
"rules": {
28+
"@nx/nx-plugin-checks": "error"
29+
}
30+
}
31+
]
32+
}

packages/angular-devkit/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# angular-devkit
2+
3+
This library was generated with [Nx](https://nx.dev).
4+
5+
## Building
6+
7+
Run `nx build angular-devkit` to build the library.
8+
9+
## Running unit tests
10+
11+
Run `nx test angular-devkit` to execute the unit tests via [Jest](https://jestjs.io).
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"generators": {
3+
"component": {
4+
"factory": "./src/generators/component/component",
5+
"schema": "./src/generators/component/schema.json",
6+
"aliases": ["c"],
7+
"description": "Generate an Angular Component."
8+
},
9+
"directive": {
10+
"factory": "./src/generators/directive/directive",
11+
"schema": "./src/generators/directive/schema.json",
12+
"aliases": ["d"],
13+
"description": "Generate an Angular directive."
14+
},
15+
"pipe": {
16+
"factory": "./src/generators/pipe/pipe",
17+
"schema": "./src/generators/pipe/schema.json",
18+
"description": "Generate an Angular Pipe",
19+
"aliases": ["p"]
20+
}
21+
}
22+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* eslint-disable */
2+
export default {
3+
displayName: 'angular-devkit',
4+
preset: '../../jest.preset.js',
5+
transform: {
6+
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
7+
},
8+
moduleFileExtensions: ['ts', 'js', 'html'],
9+
coverageDirectory: '../../coverage/packages/angular-devkit',
10+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "angular-devkit",
3+
"version": "0.0.1",
4+
"dependencies": {
5+
"@nx/devkit": "19.7.4",
6+
"tslib": "^2.3.0",
7+
"@nx/js": "19.7.4",
8+
"typescript": "~5.5.0",
9+
"@phenomnomnominal/tsquery": "5.0.1",
10+
"@typescript-eslint/type-utils": "7.18.0",
11+
"semver": "7.6.3"
12+
},
13+
"type": "commonjs",
14+
"main": "./src/index.js",
15+
"typings": "./src/index.d.ts",
16+
"generators": "./generators.json"
17+
}

0 commit comments

Comments
 (0)