Skip to content

Commit

Permalink
feat: migrate to NX integrated monorepo (#2737)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoBorzi authored Feb 15, 2024
1 parent 3cf3de2 commit 4d202dd
Show file tree
Hide file tree
Showing 1,081 changed files with 14,176 additions and 11,936 deletions.
24 changes: 21 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"ignorePatterns": ["**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json", "e2e/tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
Expand Down Expand Up @@ -56,6 +55,25 @@
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
}
]
],
"plugins": ["@nx"]
}
2 changes: 1 addition & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies
run: npm ci
run: npm ci --include=optional
- name: electron:linux:ci
run: npm run electron:linux:ci
2 changes: 1 addition & 1 deletion .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies
run: npm ci
run: npm ci --include=optional

- name: electron:mac:ci
run: npm run electron:mac:ci
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies
run: npm ci
run: npm ci --include=optional

- name: electron:windows
run: npm run electron:windows
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies
run: npm ci
run: npm ci --include=optional

- name: Lint
run: npm run lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies
run: npm ci
run: npm ci --include=optional

- name: Lint
run: npm run lint
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ src/**/*.js
.nx/
/.angular/cache
src/coverage
apps/keira/coverage/*
/.sass-cache
/connect.lock
/coverage
Expand All @@ -48,7 +49,11 @@ testem.log
/e2e/*.map
/e2e/tracing
/e2e/screenshots
/apps/keira-e2e/screenshots

# System Files
.DS_Store
Thumbs.db


.nx/cache
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"nrwl.angular-console",
"angular.ng-template",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
179 changes: 0 additions & 179 deletions angular.json

This file was deleted.

2 changes: 1 addition & 1 deletion e2e/main.spec.ts → apps/keira-e2e/main.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test.describe('Check Home Page', async () => {
let context: BrowserContext;

test.beforeAll(async () => {
app = await electron.launch({ args: [PATH.join(__dirname, '../main.js'), PATH.join(__dirname, '../app/package.json')] });
app = await electron.launch({ args: [PATH.join(__dirname, '../../main.js'), PATH.join(__dirname, '../../app/package.json')] });
context = app.context();
await context.tracing.start({ screenshots: true, snapshots: true });
firstWindow = await app.firstWindow();
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions apps/keira-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "keira-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"targets": {},
"sourceRoot": "apps/keira-e2e/src"
}
File renamed without changes.
61 changes: 61 additions & 0 deletions apps/keira/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"ignorePatterns": ["!**/*", "src/environments/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["apps/keira/src/tsconfig.*?.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "keira",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "app",
"style": "camelCase",
"type": "attribute"
}
],
"@angular-eslint/prefer-on-push-component-change-detection": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off"
}
},
{
"files": ["*.spec.ts", "*.po.ts"],
"rules": {
"@angular-eslint/prefer-on-push-component-change-detection": "off"
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
],
"extends": "../../.eslintrc.json"
}
Loading

0 comments on commit 4d202dd

Please sign in to comment.