Skip to content

Commit

Permalink
add static environment example
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Sep 11, 2024
1 parent ec3b45d commit f1e9818
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ Production usage:

- `nx run cli-e2e:e2e` - setup environment and then run E2E tests for `cli-e2e`

Debug full environment setup:
Debug full environment in 1 setup:

- `nx run cli-e2e:setup-env` - setup environment for `cli-e2e`
- `nx run cli-e2e:setup-env --keepServerRunning` - keeps verdaccio running after setup
- `nx run cli-e2e:setup-env --keepServerRunning` - keeps verdaccio running after setup
- `nx run cli-e2e:stop-verdaccio` - stops the verdaccio server for `cli-e2e`

Debug full environment in 2 steps:

- `nx run cli-e2e:bootstrap-env` - setup folders and starts verdaccio for `cli-e2e`
- `nx run cli-e2e:install-env` - bootstraps and installs all dependencies for `cli-e2e`
- `nx run cli-e2e:stop-verdaccio` - stops the verdaccio server for `cli-e2e`

Debug packages:

Expand Down
8 changes: 7 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@
"./e2e-examples/cli-e2e-env/tooling/env.plugin.ts",
"./e2e-examples/cli-e2e-graph/tooling/graph.plugin.ts",
"./e2e-examples/cli-e2e-pretarget/tooling/pretarget.plugin.ts",
"@org/build-env"
"@org/build-env",
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "lint"
}
}
],
"release": {
"version": {
Expand Down
18 changes: 18 additions & 0 deletions static-environments/user-lists/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.base.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
8 changes: 8 additions & 0 deletions static-environments/user-lists/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "user-lists",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "projects/user-lists/src",
"projectType": "library",
"tags": [],
"targets": {}
}
8 changes: 8 additions & 0 deletions static-environments/user-lists/src/lib/sorted-users.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"name": "Alice"
},
{
"name": "Michael"
}
]
8 changes: 8 additions & 0 deletions static-environments/user-lists/src/lib/unsorted-users.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"name": "Michael"
},
{
"name": "Alice"
}
]
19 changes: 19 additions & 0 deletions static-environments/user-lists/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 static-environments/user-lists/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": ["src/**/*.spec.ts", "src/**/*.test.ts"]
}

0 comments on commit f1e9818

Please sign in to comment.