Skip to content

Commit 2fb64f2

Browse files
committed
refactor: replace with nx workspace
1 parent 6e92905 commit 2fb64f2

Some content is hidden

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

81 files changed

+17825
-3765
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.eslintrc.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nrwl/nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nrwl/nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
19+
]
20+
}
21+
]
22+
}
23+
},
24+
{
25+
"files": ["*.ts", "*.tsx"],
26+
"extends": ["plugin:@nrwl/nx/typescript"],
27+
"rules": {}
28+
},
29+
{
30+
"files": ["*.js", "*.jsx"],
31+
"extends": ["plugin:@nrwl/nx/javascript"],
32+
"rules": {}
33+
}
34+
]
35+
}

.gitignore

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,39 @@
1-
node_modules/
2-
dist/
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
32

4-
yarn.lock
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
57

6-
coverage/
8+
# dependencies
9+
/node_modules
710

8-
**/plotly.js/**
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
919

10-
**/*.tgz
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
37+
# System Files
38+
.DS_Store
39+
Thumbs.db

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Add files here to ignore them from prettier formatting
2+
3+
/dist
4+
/coverage

.prettierrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"printWidth": 120,
3-
"trailingComma": "all",
42
"singleQuote": true
5-
}
3+
}

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"angular.ng-template",
4+
"nrwl.angular-console",
5+
"esbenp.prettier-vscode",
6+
"firsttris.vscode-jest-runner",
7+
"dbaeumer.vscode-eslint"
8+
]
9+
}

angular.json

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
{
2+
"version": 1,
3+
"projects": {
4+
"nodeplotlib": {
5+
"root": "libs/nodeplotlib",
6+
"sourceRoot": "libs/nodeplotlib/src",
7+
"projectType": "library",
8+
"architect": {
9+
"build": {
10+
"builder": "@nrwl/node:package",
11+
"outputs": ["{options.outputPath}"],
12+
"options": {
13+
"outputPath": "dist/libs/nodeplotlib",
14+
"tsConfig": "libs/nodeplotlib/tsconfig.lib.json",
15+
"packageJson": "libs/nodeplotlib/package.json",
16+
"main": "libs/nodeplotlib/src/index.ts",
17+
"assets": ["libs/nodeplotlib/*.md"]
18+
}
19+
},
20+
"lint": {
21+
"builder": "@nrwl/linter:eslint",
22+
"outputs": ["{options.outputFile}"],
23+
"options": {
24+
"lintFilePatterns": ["libs/nodeplotlib/**/*.ts"]
25+
}
26+
},
27+
"test": {
28+
"builder": "@nrwl/jest:jest",
29+
"outputs": ["coverage/libs/nodeplotlib"],
30+
"options": {
31+
"jestConfig": "libs/nodeplotlib/jest.config.js",
32+
"passWithNoTests": true
33+
}
34+
}
35+
}
36+
},
37+
"web": {
38+
"projectType": "application",
39+
"root": "apps/web",
40+
"sourceRoot": "apps/web/src",
41+
"prefix": "npl",
42+
"architect": {
43+
"build": {
44+
"builder": "@angular-devkit/build-angular:browser",
45+
"outputs": ["{options.outputPath}"],
46+
"options": {
47+
"outputPath": "dist/apps/web",
48+
"index": "apps/web/src/index.html",
49+
"main": "apps/web/src/main.ts",
50+
"polyfills": "apps/web/src/polyfills.ts",
51+
"tsConfig": "apps/web/tsconfig.app.json",
52+
"assets": ["apps/web/src/favicon.ico", "apps/web/src/assets"],
53+
"styles": ["apps/web/src/styles.css"],
54+
"scripts": []
55+
},
56+
"configurations": {
57+
"production": {
58+
"budgets": [
59+
{
60+
"type": "initial",
61+
"maximumWarning": "500kb",
62+
"maximumError": "1mb"
63+
},
64+
{
65+
"type": "anyComponentStyle",
66+
"maximumWarning": "2kb",
67+
"maximumError": "4kb"
68+
}
69+
],
70+
"fileReplacements": [
71+
{
72+
"replace": "apps/web/src/environments/environment.ts",
73+
"with": "apps/web/src/environments/environment.prod.ts"
74+
}
75+
],
76+
"outputHashing": "none"
77+
},
78+
"development": {
79+
"buildOptimizer": false,
80+
"optimization": false,
81+
"vendorChunk": true,
82+
"extractLicenses": false,
83+
"sourceMap": true,
84+
"namedChunks": true
85+
}
86+
},
87+
"defaultConfiguration": "production"
88+
},
89+
"serve": {
90+
"builder": "@angular-devkit/build-angular:dev-server",
91+
"configurations": {
92+
"production": {
93+
"browserTarget": "web:build:production"
94+
},
95+
"development": {
96+
"browserTarget": "web:build:development"
97+
}
98+
},
99+
"defaultConfiguration": "development"
100+
},
101+
"extract-i18n": {
102+
"builder": "@angular-devkit/build-angular:extract-i18n",
103+
"options": {
104+
"browserTarget": "web:build"
105+
}
106+
},
107+
"lint": {
108+
"builder": "@nrwl/linter:eslint",
109+
"options": {
110+
"lintFilePatterns": [
111+
"apps/web/src/**/*.ts",
112+
"apps/web/src/**/*.html"
113+
]
114+
}
115+
},
116+
"test": {
117+
"builder": "@nrwl/jest:jest",
118+
"outputs": ["coverage/apps/web"],
119+
"options": {
120+
"jestConfig": "apps/web/jest.config.js",
121+
"passWithNoTests": true
122+
}
123+
}
124+
}
125+
},
126+
"web-e2e": {
127+
"root": "apps/web-e2e",
128+
"sourceRoot": "apps/web-e2e/src",
129+
"projectType": "application",
130+
"architect": {
131+
"e2e": {
132+
"builder": "@nrwl/cypress:cypress",
133+
"options": {
134+
"cypressConfig": "apps/web-e2e/cypress.json",
135+
"devServerTarget": "web:serve:development",
136+
"tsConfig": "apps/web-e2e/tsconfig.json"
137+
},
138+
"configurations": {
139+
"production": {
140+
"devServerTarget": "web:serve:production"
141+
}
142+
}
143+
},
144+
"lint": {
145+
"builder": "@nrwl/linter:eslint",
146+
"outputs": ["{options.outputFile}"],
147+
"options": {
148+
"lintFilePatterns": ["apps/web-e2e/**/*.{js,ts}"]
149+
}
150+
}
151+
}
152+
}
153+
},
154+
"cli": {
155+
"defaultCollection": "@nrwl/angular",
156+
"packageManager": "npm"
157+
},
158+
"schematics": {
159+
"@nrwl/angular": {
160+
"application": {
161+
"linter": "eslint"
162+
},
163+
"library": {
164+
"linter": "eslint"
165+
},
166+
"storybook-configuration": {
167+
"linter": "eslint"
168+
}
169+
},
170+
"@nrwl/angular:application": {
171+
"style": "css",
172+
"linter": "eslint",
173+
"unitTestRunner": "jest",
174+
"e2eTestRunner": "cypress"
175+
},
176+
"@nrwl/angular:library": {
177+
"style": "css",
178+
"linter": "eslint",
179+
"unitTestRunner": "jest"
180+
},
181+
"@nrwl/angular:component": {
182+
"style": "css"
183+
}
184+
},
185+
"defaultProject": "web"
186+
}

apps/.gitkeep

Whitespace-only changes.

apps/web-e2e/.eslintrc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["src/plugins/index.js"],
11+
"rules": {
12+
"@typescript-eslint/no-var-requires": "off",
13+
"no-undef": "off"
14+
}
15+
}
16+
]
17+
}

apps/web-e2e/cypress.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"fileServerFolder": ".",
3+
"fixturesFolder": "./src/fixtures",
4+
"integrationFolder": "./src/integration",
5+
"modifyObstructiveCode": false,
6+
"supportFile": "./src/support/index.ts",
7+
"pluginsFile": false,
8+
"video": true,
9+
"videosFolder": "../../dist/cypress/apps/web-e2e/videos",
10+
"screenshotsFolder": "../../dist/cypress/apps/web-e2e/screenshots",
11+
"chromeWebSecurity": false
12+
}

0 commit comments

Comments
 (0)