
committed by
Alex Rickabaugh

parent
a09782b8ac
commit
f8fcea333f
@ -1,9 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
System.import('index').catch(console.error.bind(console));
|
@ -1,30 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// this bundle is almost identical to the angular2.umd.js
|
||||
// the only difference being "testing" exports
|
||||
exports.core = require('angular2/core');
|
||||
exports.common = require('angular2/common');
|
||||
exports.compiler = require('angular2/compiler');
|
||||
exports.platform = {
|
||||
browser: require('angular2/platform/browser'),
|
||||
common_dom: require('angular2/platform/common_dom'),
|
||||
|
||||
// this is included as compared to the angular2-all.umd.js bundle
|
||||
testing: {browser: require('angular2/platform/testing/browser')}
|
||||
};
|
||||
exports.http = require('angular2/http');
|
||||
exports.router = require('angular2/router');
|
||||
exports.router_link_dsl = require('angular2/router/router_link_dsl.js');
|
||||
exports.instrumentation = require('angular2/instrumentation');
|
||||
exports.upgrade = require('angular2/upgrade');
|
||||
|
||||
// this is included as compared to the angular2-all.umd.js bundle
|
||||
exports.testing = require('angular2/testing');
|
||||
exports.http.testing = require('angular2/http/testing');
|
||||
exports.router.testing = require('angular2/router/testing');
|
@ -1,20 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
exports.core = require('angular2/core');
|
||||
exports.common = require('angular2/common');
|
||||
exports.compiler = require('angular2/compiler');
|
||||
exports.platform = {
|
||||
browser: require('angular2/platform/browser'),
|
||||
common_dom: require('angular2/platform/common_dom')
|
||||
};
|
||||
exports.http = require('angular2/http');
|
||||
exports.router = require('angular2/router');
|
||||
exports.router_link_dsl = require('angular2/router/router_link_dsl.js');
|
||||
exports.instrumentation = require('angular2/instrumentation');
|
||||
exports.upgrade = require('angular2/upgrade');
|
@ -1,39 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
var webpack = require('webpack');
|
||||
|
||||
/**
|
||||
* Wraps the original `webpack` function to convert execution
|
||||
* result to a promise and properly report errors.
|
||||
*
|
||||
* @param options
|
||||
* @returns {Function}
|
||||
*/
|
||||
function webPackPromiseify(options) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
|
||||
webpack(options, function(err, stats) {
|
||||
var jsonStats = stats.toJson() || {};
|
||||
var statsErrors = jsonStats.errors || [];
|
||||
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
if (statsErrors.length) {
|
||||
return reject(statsErrors);
|
||||
}
|
||||
|
||||
return resolve(stats);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = webPackPromiseify;
|
Reference in New Issue
Block a user