Created
November 5, 2018 23:45
-
-
Save philmerrell/6e398739a289ce0e790add615203a9fa to your computer and use it in GitHub Desktop.
Set up angular.json for use with ionic cordova build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json", | |
"version": 1, | |
"defaultProject": "app", | |
"projects": { | |
"app": { | |
"root": "", | |
"sourceRoot": "src", | |
"projectType": "application", | |
"prefix": "", | |
"schematics": {}, | |
"architect": { | |
"build": { | |
"builder": "@angular-devkit/build-angular:browser", | |
"options": { | |
"progress": false, | |
"outputPath": "www", | |
"index": "src/index.html", | |
"main": "src/main.ts", | |
"polyfills": "src/polyfills.ts", | |
"tsConfig": "src/tsconfig.app.json", | |
"assets": [ | |
{ | |
"glob": "**/*", | |
"input": "src/assets", | |
"output": "assets" | |
}, | |
{ | |
"glob": "**/*.svg", | |
"input": "node_modules/@ionic/angular/dist/ionic/svg", | |
"output": "./svg" | |
} | |
], | |
"styles": [ | |
{ | |
"input": "src/theme/variables.scss" | |
}, | |
{ | |
"input": "src/global.scss" | |
} | |
], | |
"scripts": [ | |
] | |
}, | |
"configurations": { | |
"production": { | |
"fileReplacements": [ | |
{ | |
"replace": "src/environments/environment.ts", | |
"with": "src/environments/environment.prod.ts" | |
} | |
], | |
"optimization": true, | |
"outputHashing": "all", | |
"sourceMap": false, | |
"extractCss": true, | |
"namedChunks": false, | |
"aot": true, | |
"extractLicenses": true, | |
"vendorChunk": false, | |
"buildOptimizer": true | |
}, | |
"dev": { | |
"fileReplacements": [ | |
{ | |
"replace": "src/environments/environment.ts", | |
"with": "src/environments/environment.dev.ts" | |
} | |
] | |
} | |
} | |
}, | |
"serve": { | |
"builder": "@angular-devkit/build-angular:dev-server", | |
"options": { | |
"browserTarget": "app:build" | |
}, | |
"configurations": { | |
"production": { | |
"browserTarget": "app:build:production" | |
}, | |
"dev": { | |
"browserTarget": "app:build:dev" | |
} | |
} | |
}, | |
"extract-i18n": { | |
"builder": "@angular-devkit/build-angular:extract-i18n", | |
"options": { | |
"browserTarget": "app:build" | |
} | |
}, | |
"test": { | |
"builder": "@angular-devkit/build-angular:karma", | |
"options": { | |
"main": "src/test.ts", | |
"polyfills": "src/polyfills.ts", | |
"tsConfig": "src/tsconfig.spec.json", | |
"karmaConfig": "src/karma.conf.js", | |
"styles": [ | |
"styles.css" | |
], | |
"scripts": [], | |
"assets": [ | |
{ | |
"glob": "favicon.ico", | |
"input": "src/", | |
"output": "/" | |
}, | |
{ | |
"glob": "**/*", | |
"input": "src/assets", | |
"output": "/assets" | |
} | |
] | |
} | |
}, | |
"lint": { | |
"builder": "@angular-devkit/build-angular:tslint", | |
"options": { | |
"tsConfig": [ | |
"src/tsconfig.app.json", | |
"src/tsconfig.spec.json" | |
], | |
"exclude": [ | |
"**/node_modules/**" | |
] | |
} | |
}, | |
"ionic-cordova-build": { | |
"builder": "@ionic/ng-toolkit:cordova-build", | |
"options": { | |
"browserTarget": "app:build" | |
}, | |
"configurations": { | |
"production": { | |
"browserTarget": "app:build:production" | |
}, | |
"dev": { | |
"browserTarget": "app:build:dev" | |
} | |
} | |
}, | |
"ionic-cordova-serve": { | |
"builder": "@ionic/ng-toolkit:cordova-serve", | |
"options": { | |
"cordovaBuildTarget": "app:ionic-cordova-build", | |
"devServerTarget": "app:serve" | |
}, | |
"configurations": { | |
"production": { | |
"cordovaBuildTarget": "app:ionic-cordova-build:production", | |
"devServerTarget": "app:serve:production" | |
} | |
} | |
} | |
} | |
}, | |
"app-e2e": { | |
"root": "e2e/", | |
"projectType": "application", | |
"architect": { | |
"e2e": { | |
"builder": "@angular-devkit/build-angular:protractor", | |
"options": { | |
"protractorConfig": "e2e/protractor.conf.js", | |
"devServerTarget": "app:serve" | |
} | |
}, | |
"lint": { | |
"builder": "@angular-devkit/build-angular:tslint", | |
"options": { | |
"tsConfig": "e2e/tsconfig.e2e.json", | |
"exclude": [ | |
"**/node_modules/**" | |
] | |
} | |
} | |
} | |
} | |
}, | |
"cli": { | |
"defaultCollection": "@ionic/schematics-angular" | |
}, | |
"schematics": { | |
"@ionic/schematics-angular:component": { | |
"styleext": "scss" | |
}, | |
"@ionic/schematics-angular:page": { | |
"styleext": "scss" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment