-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- refactor the whole project to be angular-cli and angular 6 compatible - use the correct library specific prefix - sort the dependencies alphabetically - remove tests for node 6 and 7 - add tests for node 9 and 10
- Loading branch information
Showing
78 changed files
with
11,549 additions
and
211 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,9 @@ dist: trusty | |
language: node_js | ||
|
||
node_js: | ||
- "10" | ||
- "9" | ||
- "8" | ||
- "7" | ||
- "6" | ||
|
||
addons: | ||
chrome: stable | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "", | ||
"projects": { | ||
"angular-archwizard": { | ||
"root": "", | ||
"sourceRoot": "src", | ||
"projectType": "library", | ||
"prefix": "aw", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-ng-packagr:build", | ||
"options": { | ||
"tsConfig": "tsconfig.lib.json", | ||
"project": "ng-package.json" | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "src/test.ts", | ||
"tsConfig": "tsconfig.spec.json", | ||
"karmaConfig": "karma.conf.js" | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"tsconfig.lib.json", | ||
"tsconfig.spec.json" | ||
], | ||
"exclude": [ | ||
"**/node_modules/**" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"defaultProject": "angular-archwizard" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,152 +1,31 @@ | ||
// Karma configuration for Unit testing | ||
|
||
const path = require('path'); | ||
// Karma configuration file, see link for more information | ||
// https://karma-runner.github.io/1.0/config/configuration-file.html | ||
|
||
module.exports = function (config) { | ||
|
||
const configuration = { | ||
|
||
// base path that will be used to resolve all patterns (eg. files, exclude) | ||
config.set({ | ||
basePath: '', | ||
|
||
// frameworks to use | ||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: ['jasmine'], | ||
|
||
frameworks: ['jasmine', '@angular-devkit/build-angular'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher'), | ||
require('karma-webpack'), | ||
require('karma-sourcemap-loader'), | ||
require('karma-spec-reporter'), | ||
require('karma-jasmine-html-reporter'), | ||
require('karma-coverage-istanbul-reporter'), | ||
require("istanbul-instrumenter-loader") | ||
], | ||
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
{ | ||
pattern: './karma-shim.js', | ||
watched: false | ||
} | ||
require('@angular-devkit/build-angular/plugins/karma') | ||
], | ||
|
||
// list of files to exclude | ||
exclude: [], | ||
|
||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: { | ||
'./karma-shim.js': ['webpack', 'sourcemap'] | ||
}, | ||
|
||
// webpack | ||
webpack: { | ||
resolve: { | ||
extensions: ['.ts', '.js'] | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts/, | ||
loaders: ['ts-loader', 'angular2-template-loader'], | ||
exclude: /node_modules/ | ||
}, | ||
{ | ||
test: /\.(ts|js)$/, | ||
loaders: ['angular-router-loader'], | ||
exclude: /node_modules/ | ||
}, | ||
{ | ||
enforce: 'post', | ||
test: /\.ts/, | ||
use: [ | ||
{ | ||
loader: 'istanbul-instrumenter-loader', | ||
options: {esModules: true} | ||
} | ||
], | ||
exclude: [/\.spec.ts/, /node_modules/] | ||
}, | ||
{ | ||
test: /\.html$/, | ||
loader: 'raw-loader' | ||
}, | ||
{ | ||
test: /\.less$/, | ||
loaders: ['to-string-loader', 'css-loader', 'less-loader'] | ||
}, | ||
{ | ||
test: /\.css$/, | ||
loaders: ['to-string-loader', 'css-loader'] | ||
}, | ||
{ | ||
test: /\.json$/, | ||
loader: 'json-loader' | ||
}, | ||
{ | ||
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)(\?v=[0-9]\.[0-9]\.[0-9])?$/, | ||
loader: 'file-loader?name=fonts/[name].[hash].[ext]?' | ||
}, | ||
], | ||
exprContextCritical: false | ||
}, | ||
performance: {hints: false} | ||
}, | ||
|
||
webpackServer: { | ||
noInfo: true | ||
client: { | ||
clearContext: false // leave Jasmine Spec Runner output visible in browser | ||
}, | ||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: ['spec', 'coverage-istanbul'], | ||
|
||
coverageIstanbulReporter: { | ||
dir: require('path').join(__dirname, './coverage'), | ||
reports: ['html', 'lcovonly'], | ||
dir: path.join(__dirname, 'coverage'), | ||
fixWebpackSourcePaths: true, | ||
// Most reporters accept additional config options. You can pass these through the `report-config` option | ||
'report-config': { | ||
|
||
// all options available at: https://github.com/istanbuljs/istanbuljs/blob/aae256fb8b9a3d19414dcf069c592e88712c32c6/packages/istanbul-reports/lib/html/index.js#L135-L137 | ||
html: { | ||
// outputs the report in ./coverage/html | ||
subdir: 'html' | ||
} | ||
|
||
} | ||
fixWebpackSourcePaths: true | ||
}, | ||
|
||
|
||
// web server port | ||
reporters: ['progress', 'kjhtml'], | ||
port: 9876, | ||
|
||
|
||
// enable / disable colors in the output (reporters and logs) | ||
colors: true, | ||
|
||
|
||
// level of logging | ||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG | ||
logLevel: config.LOG_INFO, | ||
|
||
|
||
// enable / disable watching file and executing tests whenever any file changes | ||
autoWatch: true, | ||
|
||
|
||
// start these browsers | ||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: ['ChromeHeadless'], | ||
|
||
|
||
// Continuous Integration mode | ||
// if true, Karma captures browsers, runs the tests and exits | ||
singleRun: true | ||
|
||
}; | ||
|
||
config.set(configuration); | ||
}); | ||
}; |
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
Oops, something went wrong.