Skip to content

Commit

Permalink
feat: generate qwik-angular package
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-stepanenko committed Aug 2, 2023
1 parent 6ef19ff commit 153d6d6
Show file tree
Hide file tree
Showing 21 changed files with 9,751 additions and 1,238 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
35 changes: 35 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
}
]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ testem.log
# System Files
.DS_Store
Thumbs.db

.angular
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/coverage
.angular
28 changes: 28 additions & 0 deletions .verdaccio/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# path to a directory with all packages
storage: ../tmp/local-registry/storage

# a list of other known repositories we can talk to
uplinks:
npmjs:
url: http://localhost:4873/
maxage: 60m

packages:
'**':
# give all users (including non-authenticated users) full access
# because it is a local registry
access: $all
publish: $all
unpublish: $all

# if package is not available locally, proxy requests to npm registry
proxy: npmjs

# log settings
logs:
type: stdout
format: pretty
level: warn

publish:
allow_offline: true # set offline to true to allow publish offline
6 changes: 5 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode"]
"recommendations": [
"nrwl.angular-console",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
]
}
28 changes: 10 additions & 18 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,27 @@
"default": {
"runner": "nx-cloud",
"options": {
"cacheableOperations": [
"build",
"lint",
"test",
"e2e"
],
"cacheableOperations": ["build", "lint", "test", "e2e"],
"accessToken": "NmYxNjExYTQtNGQxOS00MjBlLWI0ODAtZTJiZDZhYjhmZGE5fHJlYWQtd3JpdGU="
}
}
},
"targetDefaults": {
"build": {
"dependsOn": [
"^build"
],
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"lint": {
"inputs": [
"production",
"^production"
"default",
"{workspaceRoot}/.eslintrc.json",
"{workspaceRoot}/.eslintignore"
]
}
},
"namedInputs": {
"default": [
"{projectRoot}/**/*",
"sharedGlobals"
],
"production": [
"default"
],
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"production": ["default", "!{projectRoot}/.eslintrc.json"],
"sharedGlobals": []
},
"workspaceLayout": {
Expand Down
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,23 @@
"private": true,
"dependencies": {},
"devDependencies": {
"@nx/angular": "16.5.0",
"@nx/eslint-plugin": "16.5.0",
"@nx/js": "16.5.0",
"@nx/linter": "16.5.0",
"@nx/workspace": "16.5.0",
"@types/node": "18.7.1",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"eslint": "~8.15.0",
"eslint-config-prettier": "8.1.0",
"nx": "16.5.0",
"nx-cloud": "latest",
"prettier": "^2.6.2",
"typescript": "~5.1.3"
"typescript": "~5.1.3",
"verdaccio": "^5.0.4"
},
"nx": {
"includedScripts": []
}
}
18 changes: 18 additions & 0 deletions packages/qwik-angular/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
7 changes: 7 additions & 0 deletions packages/qwik-angular/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# qwik-angular

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build qwik-angular` to build the library.
22 changes: 22 additions & 0 deletions packages/qwik-angular/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "qwik-angular",
"version": "0.1.0",
"description": "QwikAngular allows adding Angular components into existing Qwik application",
"type": "commonjs",
"dependencies": {
"@analogjs/vite-plugin-angular": "0.2.0-beta.19",
"@angular-devkit/build-angular": "~16.1.0",
"@angular/animations": "~16.1.0",
"@angular/common": "~16.1.0",
"@angular/compiler-cli": "~16.1.0",
"@angular/compiler": "~16.1.0",
"@angular/core": "~16.1.0",
"@angular/platform-browser-dynamic": "~16.1.0",
"@angular/platform-browser": "~16.1.0",
"@angular/platform-server": "~16.1.0",
"@builder.io/qwik": "^1.0.0",
"rxjs": "~7.8.0",
"sass": "^1.60.0",
"zone.js": "~0.13.0"
}
}
30 changes: 30 additions & 0 deletions packages/qwik-angular/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "qwik-angular",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/qwik-angular/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/qwik-angular",
"main": "packages/qwik-angular/src/index.ts",
"tsConfig": "packages/qwik-angular/tsconfig.lib.json",
"assets": ["packages/qwik-angular/*.md"]
}
},
"publish": {
"command": "node tools/scripts/publish.mjs qwik-angular {args.ver} {args.tag}",
"dependsOn": ["build"]
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/qwik-angular/**/*.ts"]
}
}
},
"tags": []
}
1 change: 1 addition & 0 deletions packages/qwik-angular/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/qwik-angular';
3 changes: 3 additions & 0 deletions packages/qwik-angular/src/lib/qwik-angular.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function qwikAngular(): string {
return 'qwik-angular';
}
19 changes: 19 additions & 0 deletions packages/qwik-angular/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
}
]
}
10 changes: 10 additions & 0 deletions packages/qwik-angular/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"include": ["src/**/*.ts"],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
}
Loading

0 comments on commit 153d6d6

Please sign in to comment.