Skip to content

Commit e7ba609

Browse files
move to nx
1 parent 134c436 commit e7ba609

Some content is hidden

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

44 files changed

+7024
-2094
lines changed

.editorconfig

-16
This file was deleted.

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.eslintrc.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["!**/*"],
4+
"plugins": ["@nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts"],
8+
"extends": [
9+
"plugin:@nx/typescript",
10+
"plugin:@nx/angular",
11+
"plugin:@angular-eslint/template/process-inline-templates"
12+
],
13+
"rules": {
14+
"@angular-eslint/directive-selector": [
15+
"error",
16+
{
17+
"type": "attribute",
18+
"prefix": "modernAngular",
19+
"style": "camelCase"
20+
}
21+
],
22+
"@angular-eslint/component-selector": [
23+
"error",
24+
{
25+
"type": "element",
26+
"prefix": "app",
27+
"style": "kebab-case"
28+
}
29+
]
30+
}
31+
},
32+
{
33+
"files": ["*.html"],
34+
"extends": ["plugin:@nx/angular-template"],
35+
"rules": {}
36+
}
37+
]
38+
}

.gitignore

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

33
# compiled output
4-
/dist
5-
/tmp
4+
dist
5+
tmp
66
/out-tsc
77

88
# dependencies
9-
/node_modules
9+
node_modules
1010

1111
# IDEs and editors
1212
/.idea
@@ -25,7 +25,6 @@
2525
!.vscode/extensions.json
2626

2727
# misc
28-
/.angular/cache
2928
/.sass-cache
3029
/connect.lock
3130
/coverage
@@ -38,3 +37,5 @@ testem.log
3837
# System Files
3938
.DS_Store
4039
Thumbs.db
40+
41+
.angular

.npmrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
engine-strict=true
1+
strict-peer-dependencies=false
2+
auto-install-peers=true

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Add files here to ignore them from prettier formatting
2+
/dist
3+
/coverage
4+
.angular

.prettierrc

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
11
{
2-
"printWidth": 120,
3-
"bracketSpacing": true,
4-
"tabWidth": 2,
5-
"useTabs": false,
6-
"semi": true,
7-
"singleQuote": true,
8-
"trailingComma": "all",
9-
"arrowParens": "avoid",
10-
"plugins": ["prettier-plugin-tailwindcss"],
11-
"endOfLine": "auto"
2+
"singleQuote": true
123
}

.vscode/extensions.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3-
"recommendations": ["angular.ng-template"]
2+
"recommendations": [
3+
"nrwl.angular-console",
4+
"esbenp.prettier-vscode",
5+
"firsttris.vscode-jest-runner",
6+
"dbaeumer.vscode-eslint"
7+
]
48
}

.vscode/launch.json

-20
This file was deleted.

.vscode/tasks.json

-42
This file was deleted.

README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# ModernAngular
2-
- Global state management using Signals.
3-
- HTTP Requests using Axios and Signals.
4-
- RXJS in ReactiveForms only
5-
- Stand-alone components all the way.
6-
- LocalStorage in Signals to persist data.
72

8-
## CSS
9-
- Tailwind CSS (has CSS Class Utilities)
3+
```bash
4+
npm i -g nx
5+
npm i -g @nrwl/cli
6+
pnpx create-nx-workspace@latest
7+
```
108

11-
## E2E Testing
12-
- Playwright (can do parallel testing using web workers)
9+
- choose standalone angular app
10+
- application name, app
11+
- standalone components, yes
12+
- routing, yes
13+
- stylesheet format, css
14+
- caching, no

angular.json

-83
This file was deleted.

e2e/.eslintrc.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"extends": ["plugin:cypress/recommended"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.js", "*.jsx"],
7+
"extends": ["plugin:@nx/javascript"],
8+
"rules": {}
9+
},
10+
{
11+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
12+
"rules": {}
13+
}
14+
],
15+
"plugins": ["@nx"]
16+
}

e2e/cypress.config.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { defineConfig } from 'cypress';
2+
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
3+
4+
export default defineConfig({
5+
e2e: nxE2EPreset(__dirname),
6+
});

e2e/project.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "e2e",
3+
"$schema": "../node_modules/nx/schemas/project-schema.json",
4+
"sourceRoot": "e2e/src",
5+
"projectType": "application",
6+
"targets": {
7+
"e2e": {
8+
"executor": "@nx/cypress:cypress",
9+
"options": {
10+
"cypressConfig": "e2e/cypress.config.ts",
11+
"devServerTarget": "modern-angular:serve:development",
12+
"testingType": "e2e"
13+
},
14+
"configurations": {
15+
"production": {
16+
"devServerTarget": "modern-angular:serve:production"
17+
},
18+
"ci": {
19+
"devServerTarget": "modern-angular:serve-static"
20+
}
21+
}
22+
},
23+
"lint": {
24+
"executor": "@nx/linter:eslint",
25+
"outputs": ["{options.outputFile}"],
26+
"options": {
27+
"lintFilePatterns": ["e2e/**/*.{js,ts}"]
28+
}
29+
}
30+
},
31+
"tags": [],
32+
"implicitDependencies": ["modern-angular"]
33+
}

e2e/src/e2e/app.cy.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { getGreeting } from '../support/app.po';
2+
3+
describe('modern-angular', () => {
4+
beforeEach(() => cy.visit('/'));
5+
6+
it('should display welcome message', () => {
7+
// Custom command example, see `../support/commands.ts` file
8+
cy.login('my-email@something.com', 'myPassword');
9+
10+
// Function helper example, see `../support/app.po.ts` file
11+
getGreeting().contains('Welcome modern-angular');
12+
});
13+
});

e2e/src/fixtures/example.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Using fixtures to represent data",
3+
"email": "hello@cypress.io"
4+
}

e2e/src/support/app.po.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const getGreeting = () => cy.get('h1');

0 commit comments

Comments
 (0)