UNPKG

generator-ngx-rocket

Version:

Extensible Angular 13+ enterprise-grade project generator based on angular-cli with best practices from the community. Includes PWA/Cordova/Electron support, coding guides and more!

227 lines (226 loc) 6.5 kB
{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "<%= props.projectName %>": { "projectType": "application", "schematics": { "@schematics/angular:component": { "style": "scss" }, "@schematics/angular:application": { <% if (props.strict) { -%> "strict": true <% } else { -%> "strict": false <% } -%> } }, "root": "", "sourceRoot": "src", "prefix": "app", "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "<%= props.target.includes('cordova') ? 'www' : 'dist' %>", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", "inlineStyleLanguage": "scss", "assets": [ <% if (props.target.includes('web')) { -%> "src/favicon.ico", "src/apple-touch-icon.png", "src/robots.txt", <% } -%> <% if (props.pwa) { -%> "src/manifest.webmanifest", <% } -%> <% if (props.ui === 'ionic') { -%> { "glob": "**/*.svg", "input": "node_modules/ionicons/dist/ionicons/svg", "output": "./svg" }, <% } -%> "src/assets" ], "styles": [ "src/main.scss" ], "scripts": [] }, "configurations": { "production": { "budgets": [ { "type": "initial", "maximumWarning": "2mb", "maximumError": "5mb" }, { "type": "anyComponentStyle", "maximumWarning": "6kb", "maximumError": "10kb" } ], <% if (props.pwa) { -%> "serviceWorker": true, <% } -%> "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } ], "outputHashing": "all" }, "development": { "buildOptimizer": false, "optimization": false, "vendorChunk": true, "extractLicenses": false, "sourceMap": true, "namedChunks": true }, "ci": { "progress": false } }, "defaultConfiguration": "production" }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", "configurations": { "production": { "browserTarget": "<%= props.projectName %>:build:production" }, "development": { "browserTarget": "<%= props.projectName %>:build:development" }, "ci": { "progress": false } }, "defaultConfiguration": "development" }, "extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n", "options": { "browserTarget": "<%= props.projectName %>:build" } }, "test": { <% if (props.tools.includes('jest')) { -%> "builder": "@angular-builders/jest:run", "options": { "watch": true }, "configurations": { "ci": { "watch": false, "ci": true, "coverage": true, "silent": true } } <% } else { -%> "builder": "@angular-devkit/build-angular:karma", "options": { "main": "src/test.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", "scripts": [], "styles": [ "src/main.scss" ], "assets": [ <% if (props.target.includes('web')) { -%> "src/favicon.ico", "src/apple-touch-icon.png", "src/robots.txt", <% } -%> <% if (props.pwa) { -%> "src/manifest.webmanifest", <% } -%> <% if (props.ui === 'ionic') { -%> { "glob": "**/*.svg", "input": "node_modules/ionicons/dist/ionicons/svg", "output": "./svg" }, <% } -%> "src/assets" ] }, "configurations": { "ci": { "progress": false, "watch": false } } <% } -%> }, "lint": { "builder": "@angular-eslint/builder:lint", "options": { "lintFilePatterns": [ "src/**/*.ts", "src/**/*.html" ] } <% if (props.e2e) { -%> }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { "protractorConfig": "e2e/protractor.conf.js", "devServerTarget": "<%= props.projectName %>:serve" }, "configurations": { "production": { "devServerTarget": "<%= props.projectName %>:serve:production" } } <% } -%> <% if (props.cypress) { -%> }, "cypress-run": { "builder": "@cypress/schematic:cypress", "options": { "devServerTarget": "<%= props.projectName %>:serve" }, "configurations": { "production": { "devServerTarget": "<%= props.projectName %>:serve:production" } } }, "cypress-open": { "builder": "@cypress/schematic:cypress", "options": { "watch": true, "headless": false } }, "e2e": { "builder": "@cypress/schematic:cypress", "options": { "devServerTarget": "<%= props.projectName %>:serve" }, "configurations": { "production": { "devServerTarget": "<%= props.projectName %>:serve:production" } } <% } -%> } } } }, "defaultProject": "<%= props.projectName %>" }