Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Update to Angular CLI v6 #431

Merged
merged 7 commits into from
Apr 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ language: node_js
sudo: false

node_js:
- '6.9.1'
# Use the explicit NodeJS LTS version 8.9.4 to avoid any automatic upgrade of the version.
# This ensures that all Travis jobs run consistently and don't have different Node versions.
- '8.9.4'

branches:
only:
Expand All @@ -14,7 +16,7 @@ env:
- SAUCE_USERNAME=angular-ci
- SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
- BROWSER_STACK_USERNAME=angularteam1
- BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB
- BROWSER_STACK_ACCESS_KEY=CaXMeMHD9pr5PHg8N7Jq
- BROWSER_PROVIDER_READY_FILE=/tmp/material-angular-io-build/readyfile
- BROWSER_PROVIDER_ERROR_FILE=/tmp/material-angular-io-build/errorfile
matrix:
Expand All @@ -38,4 +40,4 @@ script:

cache:
directories:
- node_modules
- node_modules
65 changes: 0 additions & 65 deletions angular-cli.json

This file was deleted.

186 changes: 186 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
{
"version": 1,
"newProjectRoot": "projects",
"projects": {
"material-angular-io": {
"root": "",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"sourceMap": false,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.json",
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "/assets"
},
{
"glob": "favicon.ico",
"input": "src",
"output": "/"
}
],
"styles": [
{
"input": "src/main.scss"
},
{
"input": "src/highlightjs/material-light.css"
},
{
"input": "src/assets/pink-bluegrey.css",
"lazy": true,
"bundleName": "pink-bluegrey"
},
{
"input": "src/assets/deeppurple-amber.css",
"lazy": true,
"bundleName": "deeppurple-amber"
},
{
"input": "src/assets/indigo-pink.css",
"lazy": true,
"bundleName": "indigo-pink"
},
{
"input": "src/assets/purple-green.css",
"lazy": true,
"bundleName": "purple-green"
}
],
"scripts": []
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"serviceWorker": true,
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "material-angular-io:build"
},
"configurations": {
"production": {
"browserTarget": "material-angular-io:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "material-angular-io:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"karmaConfig": "./karma.conf.js",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [
{
"input": "src/main.scss"
},
{
"input": "src/highlightjs/material-light.css"
},
{
"input": "src/assets/pink-bluegrey.css",
"lazy": true,
"bundleName": "pink-bluegrey"
},
{
"input": "src/assets/deeppurple-amber.css",
"lazy": true,
"bundleName": "deeppurple-amber"
},
{
"input": "src/assets/indigo-pink.css",
"lazy": true,
"bundleName": "indigo-pink"
},
{
"input": "src/assets/purple-green.css",
"lazy": true,
"bundleName": "purple-green"
}
],
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "/assets"
},
{
"glob": "favicon.ico",
"input": "src",
"output": "/"
}
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"material-angular-io-e2e": {
"root": "",
"projectType": "application",
"cli": {},
"schematics": {},
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "material-angular-io:serve"
}
}
}
}
},
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "css"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
}
36 changes: 11 additions & 25 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,29 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
const {customLaunchers, platformMap} = require('./browser-providers');
const path = require('path');

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-remap-istanbul'),
require('@angular/cli/plugins/karma'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-browserstack-launcher'),
require('karma-sauce-launcher'),
],
files: [
{pattern: './src/test.ts', watched: false},
{pattern: 'node_modules/hammerjs/hammer.js', included: true, watched: false},
],
preprocessors: {
'./src/test.ts': ['@angular/cli']
},
mime: {
'text/x-typescript': ['ts','tsx']
},
remapIstanbulReporter: {
reports: {
html: 'coverage',
lcovonly: './coverage/coverage.lcov'
}
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
angularCli: {
config: './angular-cli.json',
environment: 'dev'
coverageIstanbulReporter: {
dir: require('path').join(__dirname, 'coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: config.angularCli && config.angularCli.codeCoverage
? ['dots', 'karma-remap-istanbul']
: ['dots'],
rreporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
Expand Down
File renamed without changes.
Loading