-
Notifications
You must be signed in to change notification settings - Fork 817
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a new build system for angular2-google-maps. BREAKING CHANGE: `provideLazyMapsAPILoaderConfig` is gone. Please use the `AgmCoreModule#forRoot` method instead. `LazyMapsAPILoaderConfig` is gone and is now a token named `LAZY_MAPS_API_CONFIG`. Please use the `AgmCoreModule#forRoot` instead.
- Loading branch information
1 parent
59ba45b
commit db048cc
Showing
28 changed files
with
4,745 additions
and
650 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
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 +1 @@ | ||
5 | ||
6 |
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
This file was deleted.
Oops, something went wrong.
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
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,72 +1,95 @@ | ||
module.exports = function(config) { | ||
var configuration = { | ||
var path = require('path'); | ||
|
||
var webpackConfig = require('./webpack.config'); | ||
var ENV = process.env.npm_lifecycle_event; | ||
var isTestWatch = ENV === 'test-watch'; | ||
|
||
module.exports = function (config) { | ||
var _config = { | ||
|
||
// base path that will be used to resolve all patterns (eg. files, exclude) | ||
basePath: '', | ||
|
||
// frameworks to use | ||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: ['jasmine'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher') | ||
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
{ pattern: './karma-test-shim.js', watched: false } | ||
], | ||
|
||
// list of files to exclude | ||
exclude: [], | ||
|
||
customLaunchers: { | ||
Chrome_travis: { | ||
base: 'Chrome', | ||
flags: ['--no-sandbox'] | ||
} | ||
Chrome_travis: { | ||
base: 'Chrome', | ||
flags: ['--no-sandbox'] | ||
} | ||
}, | ||
files: [ | ||
'node_modules/systemjs/dist/system-polyfills.js', | ||
'node_modules/core-js/client/core.js', | ||
'node_modules/reflect-metadata/Reflect.js', | ||
|
||
'node_modules/zone.js/dist/zone.js', | ||
'node_modules/zone.js/dist/long-stack-trace-zone.js', | ||
'node_modules/zone.js/dist/proxy.js', | ||
'node_modules/zone.js/dist/sync-test.js', | ||
'node_modules/zone.js/dist/jasmine-patch.js', | ||
'node_modules/zone.js/dist/async-test.js', | ||
'node_modules/zone.js/dist/fake-async-test.js', | ||
|
||
{pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: true}, | ||
|
||
{pattern: 'karma-systemjs-config.js', included: true, watched: true}, | ||
|
||
{pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false}, | ||
{pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false}, | ||
{pattern: 'node_modules/@angular/**/*.js', included: false, watched: false}, | ||
{pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false}, | ||
|
||
{pattern: 'karma-test-shim.js', included: true, watched: true}, | ||
|
||
// paths loaded via module imports | ||
{pattern: 'dist/**/*.js', included: false, watched: true}, | ||
{pattern: 'test-built/**/*.js', included: false, watched: true}, | ||
|
||
// paths loaded via Angular's component compiler | ||
// (these paths need to be rewritten, see proxies section) | ||
// {pattern: 'dist/**/*.html', included: false, watched: true}, | ||
// {pattern: 'dist/**/*.css', included: false, watched: true}, | ||
|
||
// paths to support debugging with source maps in dev tools | ||
{pattern: 'dist/**/*.ts', included: false, watched: false}, | ||
{pattern: 'dist/**/*.js.map', included: false, watched: false} | ||
], | ||
|
||
// proxied base paths | ||
proxies: { | ||
// required for component assests fetched by Angular's compiler | ||
'/dist/': '/base/dist/', | ||
'/base/src/': '/base/dist/', | ||
'/base/test-built/src': '/base/dist' | ||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: { | ||
'./karma-test-shim.js': ['webpack', 'sourcemap'] | ||
}, | ||
reporters: ['progress'], | ||
|
||
webpack: webpackConfig, | ||
|
||
webpackMiddleware: { | ||
// webpack-dev-middleware configuration | ||
// i. e. | ||
stats: 'errors-only' | ||
}, | ||
|
||
webpackServer: { | ||
noInfo: true // please don't spam the console when running in karma! | ||
}, | ||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress', 'mocha' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: ["mocha"], | ||
|
||
// web server port | ||
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, | ||
autoWatch: true, | ||
browsers: ['Chrome'], | ||
singleRun: false | ||
|
||
// enable / disable watching file and executing tests whenever any file changes | ||
autoWatch: false, | ||
|
||
// start these browsers | ||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: isTestWatch ? ['Chrome'] : [process.env.TRAVIS ? 'Chrome_travis' : 'Chrome'], | ||
|
||
// Continuous Integration mode | ||
// if true, Karma captures browsers, runs the tests and exits | ||
singleRun: true | ||
}; | ||
if (process.env.TRAVIS) { | ||
configuration.browsers = ['Chrome_travis']; | ||
|
||
|
||
|
||
if (!isTestWatch) { | ||
_config.reporters.push("coverage"); | ||
|
||
_config.coverageReporter = { | ||
dir: 'coverage/', | ||
reporters: [{ | ||
type: 'json', | ||
dir: 'coverage', | ||
subdir: 'json', | ||
file: 'coverage-final.json' | ||
}] | ||
}; | ||
} | ||
config.set(configuration); | ||
}; | ||
|
||
config.set(_config); | ||
|
||
}; |
Oops, something went wrong.