Skip to content

Commit

Permalink
fix(interaction.app): update to angular 8 with custom webpack for IE11
Browse files Browse the repository at this point in the history
  • Loading branch information
alovicu committed Nov 15, 2019
1 parent 9ee39ae commit 9a90fca
Show file tree
Hide file tree
Showing 21 changed files with 415 additions and 273 deletions.
7 changes: 0 additions & 7 deletions interaction/app/default/.babelrc

This file was deleted.

171 changes: 80 additions & 91 deletions interaction/app/default/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,15 @@
"newProjectRoot": "projects",
"projects": {
"@vivocha/client-interaction": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "vvc",
"schematics": {
"@schematics/angular:component": {
"inlineStyle": true,
"styleext": "scss",
"spec": false
},
"@schematics/angular:class": {
"spec": false
},
"@schematics/angular:directive": {
"spec": false
},
"@schematics/angular:guard": {
"spec": false
},
"@schematics/angular:module": {
"spec": false
},
"@schematics/angular:pipe": {
"spec": false
},
"@schematics/angular:service": {
"spec": false
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "vvc",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
Expand All @@ -41,7 +21,8 @@
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.app.json",
"aot": false,
"assets": [
"src/scss",
"src/static",
Expand All @@ -66,7 +47,19 @@
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
Expand All @@ -91,71 +84,69 @@
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/scss",
"src/static",
"src/favicon.ico"
]
],
"styles": [],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "@vivocha/client-interaction:serve"
},
"configurations": {
"production": {
"devServerTarget": "@vivocha/client-interaction:serve:production"
}
}
}
}
},
"@vivocha/client-interaction-ie": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "vvc",
"schematics": {
"@schematics/angular:component": {
"inlineStyle": true,
"styleext": "scss",
"spec": false
},
"@schematics/angular:class": {
"spec": false
},
"@schematics/angular:directive": {
"spec": false
},
"@schematics/angular:guard": {
"spec": false
},
"@schematics/angular:module": {
"spec": false
},
"@schematics/angular:pipe": {
"spec": false
},
"@schematics/angular:service": {
"spec": false
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "vvc",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"outputPath": "dist/ie",
"customWebpackConfig": {
"path": "./custom-webpack.config.js",
"mergeStrategies": { "externals": "replace" }
},
"outputPath": "dist/assets/ie",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ie.ts",
"tsConfig": "src/tsconfig.app.ie.json",
"tsConfig": "tsconfig.app.ie.json",
"aot": true,
"assets": [],
"styles": [],
"scripts": []
Expand All @@ -176,7 +167,19 @@
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
Expand All @@ -201,60 +204,46 @@
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ie.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [],
"tsConfig": "tsconfig.spec.ie.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/scss",
"src/static",
"src/favicon.ico"
]
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.ie.json",
"src/tsconfig.spec.json"
"tsconfig.app.ie.json",
"tsconfig.spec.ie.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"@vivocha/client-interaction-e2e": {
"root": "",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "@vivocha/client-interaction:serve"
"devServerTarget": "@vivocha/client-interaction-ie:serve"
},
"configurations": {
"production": {
"devServerTarget": "@vivocha/client-interaction-e2e:serve:production"
"devServerTarget": "@vivocha/client-interaction-ie:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "@vivocha/client-interaction"
}
}
14 changes: 0 additions & 14 deletions interaction/app/default/bitbucket-pipelines.yml

This file was deleted.

12 changes: 12 additions & 0 deletions interaction/app/default/browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
4 changes: 4 additions & 0 deletions interaction/app/default/custom-webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = (config, options) => {
config.resolve.alias['@vivocha/public-entities/dist/wrappers/data_collection'] = '@vivocha/public-entities/dist/es5/wrappers/data_collection';
return config;
};
32 changes: 32 additions & 0 deletions interaction/app/default/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/my-first-project'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};
Loading

0 comments on commit 9a90fca

Please sign in to comment.