Skip to content

Commit

Permalink
refactor: migrate angular.json to workspace.json v2, change all comma…
Browse files Browse the repository at this point in the history
…nds to use Nx CLI (#138)
  • Loading branch information
brandonroberts authored Apr 6, 2021
1 parent 70f69ca commit ff29288
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 43 deletions.
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"start": "nx serve",
"build": "nx build",
"test": "ng test",
"lint": "nx workspace-lint && ng lint",
"e2e": "ng e2e",
"test": "nx test",
"lint": "nx workspace-lint && nx lint",
"e2e": "nx e2e",
"affected:apps": "nx affected:apps",
"affected:libs": "nx affected:libs",
"affected:build": "nx affected:build",
Expand All @@ -21,7 +20,6 @@
"format:write": "nx format:write",
"format:check": "nx format:check",
"update": "nx migrate latest",
"update:check": "ng update",
"dep-graph": "nx dep-graph",
"help": "nx help",
"nx": "nx",
Expand All @@ -41,6 +39,7 @@
"@emotion/babel-preset-css-prop": "11.0.0",
"@emotion/react": "11.0.0",
"@emotion/styled": "11.0.0",
"@ngrx/component-store": "11.0.0",
"@ngrx/effects": "11.0.0",
"@ngrx/entity": "11.0.0",
"@ngrx/router-store": "11.0.0",
Expand All @@ -54,8 +53,7 @@
"react-router-dom": "5.2.0",
"rxjs": "~6.5.5",
"tslib": "^2.0.0",
"zone.js": "~0.10.3",
"@ngrx/component-store": "11.0.0"
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.1102.0",
Expand Down
69 changes: 34 additions & 35 deletions angular.json → workspace.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"version": 2,
"newProjectRoot": "",
"projects": {
"products": {
"projectType": "application",
"schematics": {
"generators": {
"@nrwl/workspace:component": {
"style": "scss"
}
},
"root": "apps/products",
"sourceRoot": "apps/products/src",
"prefix": "nx-example",
"architect": {
"targets": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
Expand Down Expand Up @@ -125,7 +124,7 @@
"root": "apps/products-e2e",
"sourceRoot": "apps/products-e2e/src",
"projectType": "application",
"architect": {
"targets": {
"e2e": {
"builder": "@nrwl/cypress:cypress",
"options": {
Expand All @@ -152,8 +151,8 @@
"root": "apps/cart",
"sourceRoot": "apps/cart/src",
"projectType": "application",
"schematics": {},
"architect": {
"generators": {},
"targets": {
"build": {
"builder": "@nrwl/web:build",
"options": {
Expand Down Expand Up @@ -256,7 +255,7 @@
"root": "apps/cart-e2e",
"sourceRoot": "apps/cart-e2e/src",
"projectType": "application",
"architect": {
"targets": {
"e2e": {
"builder": "@nrwl/cypress:cypress",
"options": {
Expand All @@ -283,8 +282,8 @@
"root": "libs/shared/product/types",
"sourceRoot": "libs/shared/product/types/src",
"projectType": "library",
"schematics": {},
"architect": {
"generators": {},
"targets": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
Expand All @@ -298,8 +297,8 @@
"root": "libs/shared/product/data",
"sourceRoot": "libs/shared/product/data/src",
"projectType": "library",
"schematics": {},
"architect": {
"generators": {},
"targets": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
Expand All @@ -313,8 +312,8 @@
"root": "libs/shared/product/ui",
"sourceRoot": "libs/shared/product/ui/src",
"projectType": "library",
"schematics": {},
"architect": {
"generators": {},
"targets": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
Expand All @@ -340,7 +339,7 @@
"root": "libs/products/home-page",
"sourceRoot": "libs/products/home-page/src",
"prefix": "nx-example",
"architect": {
"targets": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
Expand All @@ -360,7 +359,7 @@
"outputs": ["coverage/libs/products/home-page"]
}
},
"schematics": {
"generators": {
"@nrwl/angular:component": {
"styleext": "scss"
}
Expand All @@ -370,8 +369,8 @@
"root": "libs/cart/cart-page",
"sourceRoot": "libs/cart/cart-page/src",
"projectType": "library",
"schematics": {},
"architect": {
"generators": {},
"targets": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
Expand All @@ -396,8 +395,8 @@
"root": "libs/shared/e2e-utils",
"sourceRoot": "libs/shared/e2e-utils/src",
"projectType": "library",
"schematics": {},
"architect": {
"generators": {},
"targets": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
Expand All @@ -411,8 +410,8 @@
"root": "libs/shared/jsxify",
"sourceRoot": "libs/shared/jsxify/src",
"projectType": "library",
"schematics": {},
"architect": {
"generators": {},
"targets": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
Expand All @@ -427,7 +426,7 @@
"root": "libs/shared/cart/state",
"sourceRoot": "libs/shared/cart/state/src",
"prefix": "nx-example",
"architect": {
"targets": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
Expand All @@ -447,7 +446,7 @@
"outputs": ["coverage/libs/shared/cart/state"]
}
},
"schematics": {
"generators": {
"@nrwl/angular:component": {
"styleext": "scss"
}
Expand All @@ -458,7 +457,7 @@
"root": "libs/shared/product/state",
"sourceRoot": "libs/shared/product/state/src",
"prefix": "nx-example",
"architect": {
"targets": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
Expand All @@ -478,7 +477,7 @@
"outputs": ["coverage/libs/shared/product/state"]
}
},
"schematics": {
"generators": {
"@nrwl/angular:component": {
"styleext": "scss"
}
Expand All @@ -488,15 +487,15 @@
"root": "libs/shared/assets",
"sourceRoot": "libs/shared/assets/src",
"projectType": "library",
"schematics": {},
"architect": {}
"generators": {},
"targets": {}
},
"shared-header": {
"root": "libs/shared/header",
"sourceRoot": "libs/shared/header/src",
"projectType": "library",
"schematics": {},
"architect": {
"generators": {},
"targets": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
Expand All @@ -522,7 +521,7 @@
"root": "libs/products/product-detail-page",
"sourceRoot": "libs/products/product-detail-page/src",
"prefix": "nx-example",
"architect": {
"targets": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
Expand All @@ -545,7 +544,7 @@
"outputs": ["coverage/libs/products/product-detail-page"]
}
},
"schematics": {
"generators": {
"@nrwl/angular:component": {
"styleext": "scss"
}
Expand All @@ -555,8 +554,8 @@
"root": "libs/shared/styles",
"sourceRoot": "libs/shared/styles/src",
"projectType": "library",
"schematics": {},
"architect": {
"generators": {},
"targets": {
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
Expand All @@ -575,7 +574,7 @@
"defaultCollection": "@nrwl/angular",
"analytics": false
},
"schematics": {
"generators": {
"@nrwl/angular:application": {
"unitTestRunner": "jest",
"e2eTestRunner": "cypress"
Expand Down

0 comments on commit ff29288

Please sign in to comment.