Skip to content

Commit

Permalink
chore(repo): convert to project.json files (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder authored Jul 8, 2021
1 parent df156a7 commit 8eb1c58
Show file tree
Hide file tree
Showing 19 changed files with 585 additions and 603 deletions.
28 changes: 28 additions & 0 deletions apps/cart-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"root": "apps/cart-e2e",
"sourceRoot": "apps/cart-e2e/src",
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "apps/cart-e2e/cypress.json",
"tsConfig": "apps/cart-e2e/tsconfig.e2e.json",
"devServerTarget": "cart:serve"
},
"configurations": {
"production": {
"devServerTarget": "cart:serve:production"
}
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["apps/cart-e2e/**/*.{ts,tsx,js,jsx}"]
}
}
},
"tags": ["scope:cart", "type:e2e"],
"implicitDependencies": ["cart"]
}
102 changes: 102 additions & 0 deletions apps/cart/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"root": "apps/cart",
"sourceRoot": "apps/cart/src",
"projectType": "application",
"generators": {},
"targets": {
"build": {
"executor": "@nrwl/web:build",
"options": {
"outputPath": "dist/apps/cart",
"webpackConfig": "@nrwl/react/plugins/webpack",
"index": "apps/cart/src/index.html",
"main": "apps/cart/src/main.tsx",
"polyfills": "apps/cart/src/polyfills.ts",
"tsConfig": "apps/cart/tsconfig.app.json",
"assets": [
"apps/cart/src/_redirects",
{
"input": "libs/shared/assets/src/assets",
"glob": "**/*",
"output": "assets"
},
{
"input": "libs/shared/assets/src",
"glob": "favicon.ico",
"output": ""
}
],
"maxWorkers": 8,
"styles": [
"libs/shared/styles/src/index.scss",
"libs/shared/header/index.scss",
"node_modules/normalize.css/normalize.css"
],
"scripts": [],
"buildLibsFromSource": true
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "apps/cart/src/environments/environment.ts",
"with": "apps/cart/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
},
"outputs": ["{options.outputPath}"]
},
"serve": {
"executor": "@nrwl/web:dev-server",
"options": {
"buildTarget": "cart:build"
},
"configurations": {
"production": {
"buildTarget": "cart:build:production"
}
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["apps/cart/**/*.{ts,tsx,js,jsx}"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"options": {
"jestConfig": "apps/cart/jest.config.js",
"passWithNoTests": true
},
"outputs": ["coverage/apps/cart"]
},
"deploy": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "npx ts-node --project tools/tsconfig.tools.json tools/scripts/deploy --siteName nrwl-nx-examples-cart --outputPath dist/apps/cart"
}
]
}
}
},
"tags": ["type:app", "scope:cart"],
"implicitDependencies": ["shared-assets", "shared-styles"]
}
28 changes: 28 additions & 0 deletions apps/products-e2e/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"root": "apps/products-e2e",
"sourceRoot": "apps/products-e2e/src",
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "apps/products-e2e/cypress.json",
"tsConfig": "apps/products-e2e/tsconfig.e2e.json",
"devServerTarget": "products:serve"
},
"configurations": {
"production": {
"devServerTarget": "products:serve:production"
}
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["apps/products-e2e/**/*.{js,ts}"]
}
}
},
"tags": ["scope:products", "type:e2e"],
"implicitDependencies": ["products"]
}
119 changes: 119 additions & 0 deletions apps/products/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"projectType": "application",
"generators": {
"@nrwl/workspace:component": {
"style": "scss"
}
},
"root": "apps/products",
"sourceRoot": "apps/products/src",
"prefix": "nx-example",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/apps/products",
"index": "apps/products/src/index.html",
"main": "apps/products/src/main.ts",
"polyfills": "apps/products/src/polyfills.ts",
"tsConfig": "apps/products/tsconfig.app.json",
"assets": [
"apps/products/src/_redirects",
{
"input": "libs/shared/assets/src/assets",
"glob": "**/*",
"output": "assets"
},
{
"input": "libs/shared/assets/src",
"glob": "favicon.ico",
"output": "."
}
],
"styles": [
"libs/shared/styles/src/index.scss",
"libs/shared/header/index.scss",
"node_modules/normalize.css/normalize.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "apps/products/src/environments/environment.ts",
"with": "apps/products/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
},
"outputs": ["{options.outputPath}"]
},
"serve": {
"executor": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "products:build"
},
"configurations": {
"production": {
"browserTarget": "products:build:production"
}
}
},
"extract-i18n": {
"executor": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "products:build"
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/products/src/**/*.ts",
"apps/products/src/**/*.html"
]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"options": {
"jestConfig": "apps/products/jest.config.js",
"passWithNoTests": true
},
"outputs": ["coverage/apps/products"]
},
"deploy": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "npx ts-node --project tools/tsconfig.tools.json tools/scripts/deploy --siteName nrwl-nx-examples-products --outputPath dist/apps/products"
}
]
}
}
},
"tags": ["type:app", "scope:products"],
"implicitDependencies": ["shared-assets", "shared-styles"]
}
26 changes: 26 additions & 0 deletions libs/cart/cart-page/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"root": "libs/cart/cart-page",
"sourceRoot": "libs/cart/cart-page/src",
"projectType": "library",
"generators": {},
"targets": {
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"libs/cart/cart-page/src/**/*.ts",
"libs/cart/cart-page/src/**/*.html"
]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/cart/cart-page/jest.config.js",
"passWithNoTests": true
},
"outputs": ["coverage/libs/cart/cart-page"]
}
},
"tags": ["scope:cart", "type:feature"]
}
31 changes: 31 additions & 0 deletions libs/products/home-page/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"projectType": "library",
"root": "libs/products/home-page",
"sourceRoot": "libs/products/home-page/src",
"prefix": "nx-example",
"targets": {
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"libs/products/home-page/src/**/*.ts",
"libs/products/home-page/src/**/*.html"
]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/products/home-page/jest.config.js",
"passWithNoTests": true
},
"outputs": ["coverage/libs/products/home-page"]
}
},
"generators": {
"@nrwl/angular:component": {
"styleext": "scss"
}
},
"tags": ["scope:products", "type:feature"]
}
31 changes: 31 additions & 0 deletions libs/products/product-detail-page/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"projectType": "library",
"root": "libs/products/product-detail-page",
"sourceRoot": "libs/products/product-detail-page/src",
"prefix": "nx-example",
"targets": {
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"libs/products/product-detail-page/src/**/*.ts",
"libs/products/product-detail-page/src/**/*.html"
]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/products/product-detail-page/jest.config.js",
"passWithNoTests": true
},
"outputs": ["coverage/libs/products/product-detail-page"]
}
},
"generators": {
"@nrwl/angular:component": {
"styleext": "scss"
}
},
"tags": ["type:feature", "scope:products"]
}
8 changes: 8 additions & 0 deletions libs/shared/assets/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"root": "libs/shared/assets",
"sourceRoot": "libs/shared/assets/src",
"projectType": "library",
"generators": {},
"targets": {},
"tags": ["type:assets", "scope:shared"]
}
Loading

0 comments on commit 8eb1c58

Please sign in to comment.