build: fix rollup config file paths

This commit is contained in:
Jason Aden 2017-03-06 16:51:03 -08:00
parent 5aed1e36b8
commit 72563b61fb
29 changed files with 86 additions and 49 deletions

View File

@ -7,10 +7,10 @@
*/
export default {
entry: '../../../dist/packages-dist/animation/index.js',
dest: '../../../dist/packages-dist/animation/bundles/animation.umd.js',
entry: '../../dist/packages-dist/animations/@angular/animations.es5.js',
dest: '../../dist/packages-dist/animations/bundles/animations.umd.js',
format: 'umd',
moduleName: 'ng.animation',
moduleName: 'ng.animations',
globals: {
'@angular/core': 'ng.core',
'rxjs/Observable': 'Rx',

View File

@ -6,9 +6,9 @@
"noImplicitAny": true,
"sourceMap": true,
"baseUrl": ".",
"outDir": "../../../dist/packages/benchpress",
"outDir": "../../dist/packages/benchpress",
"paths": {
"@angular/core": ["../../../dist/packages/core"]
"@angular/core": ["../../dist/packages/core"]
},
"experimentalDecorators": true,
"rootDir": ".",

View File

@ -7,8 +7,8 @@
*/
export default {
entry: '../../../dist/packages-dist/common/index.js',
dest: '../../../dist/packages-dist/common/bundles/common.umd.js',
entry: '../../dist/packages-dist/common/@angular/common.es5.js',
dest: '../../dist/packages-dist/common/bundles/common.umd.js',
format: 'umd',
moduleName: 'ng.common',
globals: {

View File

@ -7,7 +7,7 @@
*/
export default {
entry: '../../../dist/packages-dist/common/testing/index.js',
entry: '../../../dist/packages-dist/common/@angular/common/testing.es5.js',
dest: '../../../dist/packages-dist/common/bundles/common-testing.umd.js',
format: 'umd',
moduleName: 'ng.common.testing',

View File

@ -3,7 +3,7 @@
"compilerOptions": {
"paths": {
"@angular/core": ["../../dist/packages/core/"],
"@angular/core": ["../../dist/packages/core"],
"@angular/common": ["../../dist/packages/common"]
}
},

View File

@ -7,8 +7,8 @@
*/
export default {
entry: '../../../dist/packages-dist/compiler/index.js',
dest: '../../../dist/packages-dist/compiler/bundles/compiler.umd.js',
entry: '../../dist/packages-dist/compiler/@angular/compiler.es5.js',
dest: '../../dist/packages-dist/compiler/bundles/compiler.umd.js',
format: 'umd',
moduleName: 'ng.compiler',
globals: {

View File

@ -7,7 +7,7 @@
*/
export default {
entry: '../../../dist/packages-dist/compiler/testing/index.js',
entry: '../../../dist/packages-dist/compiler/@angular/compiler/testing.es5.js',
dest: '../../../dist/packages-dist/compiler/bundles/compiler-testing.umd.js',
format: 'umd',
moduleName: 'ng.compiler.testing',

View File

@ -1 +0,0 @@
../src

View File

@ -7,7 +7,7 @@
*/
export default {
entry: '../../../dist/packages-dist/core/testing/index.js',
entry: '../../../dist/packages-dist/core/@angular/core/testing.es5.js',
dest: '../../../dist/packages-dist/core/bundles/core-testing.umd.js',
format: 'umd',
moduleName: 'ng.core.testing',

View File

@ -17,7 +17,8 @@
"lib": ["es2015", "dom"],
"skipLibCheck": true,
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
"types": []
"types": [],
"preserveConstEnums": true
},
"files": [
"public_api.ts",

View File

@ -7,8 +7,8 @@
*/
export default {
entry: '../../../dist/packages-dist/forms/index.js',
dest: '../../../dist/packages-dist/forms/bundles/forms.umd.js',
entry: '../../dist/packages-dist/forms/@angular/forms.es5.js',
dest: '../../dist/packages-dist/forms/bundles/forms.umd.js',
format: 'umd',
moduleName: 'ng.forms',
globals: {

View File

@ -7,8 +7,8 @@
*/
export default {
entry: '../../../dist/packages-dist/http/index.js',
dest: '../../../dist/packages-dist/http/bundles/http.umd.js',
entry: '../../dist/packages-dist/http/@angular/http.es5.js',
dest: '../../dist/packages-dist/http/bundles/http.umd.js',
format: 'umd',
moduleName: 'ng.http',
globals: {

View File

@ -7,7 +7,7 @@
*/
export default {
entry: '../../../dist/packages-dist/http/testing/index.js',
entry: '../../../dist/packages-dist/http/@angular/http/testing.es5.js',
dest: '../../../dist/packages-dist/http/bundles/http-testing.umd.js',
format: 'umd',
moduleName: 'ng.http.testing',

View File

@ -10,13 +10,13 @@ import commonjs from 'rollup-plugin-commonjs';
import * as path from 'path';
var m = /^\@angular\/((\w|\-)+)(\/(\w|\d|\/|\-)+)?$/;
var location = normalize('../../../dist/packages-dist') + '/';
var rxjsLocation = normalize('../../../node_modules/rxjs');
var location = normalize('../../dist/packages-dist') + '/';
var rxjsLocation = normalize('../../node_modules/rxjs');
var esm = 'esm/';
var locations = {
'tsc-wrapped': normalize('../../../dist/tools/@angular') + '/',
'compiler-cli': normalize('../../../dist/esm') + '/'
'tsc-wrapped': normalize('../../dist/tools/@angular') + '/',
'compiler-cli': normalize('../../dist/packages') + '/'
};
var esm_suffixes = {};
@ -24,7 +24,7 @@ var esm_suffixes = {};
function normalize(fileName) {
return path.resolve(__dirname, fileName);
}
console.log('running')
function resolve(id, from) {
// console.log('Resolve id:', id, 'from', from)
if (id == '@angular/tsc-wrapped') {
@ -37,7 +37,7 @@ function resolve(id, from) {
var packageName = match[1];
var esm_suffix = esm_suffixes[packageName] || '';
var loc = locations[packageName] || location;
var r = loc + esm_suffix + packageName + (match[3] || '/index') + '.js';
var r = loc !== location && (loc + esm_suffix + packageName + (match[3] || '/index') + '.js') || loc + packageName + '/@angular/' + packageName + '.es5.js';
// console.log('** ANGULAR MAPPED **: ', r);
return r;
}
@ -62,8 +62,8 @@ module.exports = function(provided) {
`;
export default {
entry: '../../../dist/packages-dist/language-service/index.js',
dest: '../../../dist/packages-dist/language-service/bundles/language-service.umd.js',
entry: '../../dist/packages-dist/language-service/@angular/language-service.es5.js',
dest: '../../dist/packages-dist/language-service/bundles/language-service.umd.js',
format: 'amd',
moduleName: 'ng.language_service',
exports: 'named',

View File

@ -7,9 +7,8 @@
*/
export default {
entry: '../../../dist/packages-dist/platform-browser-dynamic/index.js',
dest:
'../../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
entry: '../../dist/packages-dist/platform-browser-dynamic/@angular/platform-browser-dynamic.es5.js',
dest: '../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
format: 'umd',
moduleName: 'ng.platformBrowserDynamic',
globals: {

View File

@ -7,7 +7,7 @@
*/
export default {
entry: '../../../dist/packages-dist/platform-browser-dynamic/testing/index.js',
entry: '../../../dist/packages-dist/platform-browser-dynamic/@angular/platform-browser-dynamic/testing.es5.js',
dest:
'../../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
format: 'umd',

View File

@ -0,0 +1,19 @@
/**
* @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
*/
export default {
entry: '../../../dist/packages-dist/platform-browser/@angular/platform-browser/animations.es5.js',
dest: '../../../dist/packages-dist/platform-browser/bundles/platform-browser-animations.umd.js',
format: 'umd',
moduleName: 'ng.platformBrowser.testing',
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/platform-browser': 'ng.platformBrowser'
}
};

View File

@ -0,0 +1,19 @@
/**
* @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
*/
export default {
entry: '../../../../dist/packages-dist/platform-browser/@angular/platform-browser/animations/testing.es5.js',
dest: '../../../../dist/packages-dist/platform-browser/bundles/platform-browser-animations-testing.umd.js',
format: 'umd',
moduleName: 'ng.platformBrowser.testing',
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/platform-browser': 'ng.platformBrowser'
}
};

View File

@ -7,8 +7,8 @@
*/
export default {
entry: '../../../dist/packages-dist/platform-browser/index.js',
dest: '../../../dist/packages-dist/platform-browser/bundles/platform-browser.umd.js',
entry: '../../dist/packages-dist/platform-browser/@angular/platform-browser.es5.js',
dest: '../../dist/packages-dist/platform-browser/bundles/platform-browser.umd.js',
format: 'umd',
moduleName: 'ng.platformBrowser',
globals: {

View File

@ -7,7 +7,7 @@
*/
export default {
entry: '../../../dist/packages-dist/platform-browser/testing/index.js',
entry: '../../../dist/packages-dist/platform-browser/@angular/platform-browser/testing.es5.js',
dest: '../../../dist/packages-dist/platform-browser/bundles/platform-browser-testing.umd.js',
format: 'umd',
moduleName: 'ng.platformBrowser.testing',

View File

@ -7,8 +7,8 @@
*/
export default {
entry: '../../../dist/packages-dist/platform-server/index.js',
dest: '../../../dist/packages-dist/platform-server/bundles/platform-server.umd.js',
entry: '../../dist/packages-dist/platform-server/@angular/platform-server.es5.js',
dest: '../../dist/packages-dist/platform-server/bundles/platform-server.umd.js',
format: 'umd',
moduleName: 'ng.platformServer',
globals: {

View File

@ -7,7 +7,7 @@
*/
export default {
entry: '../../../dist/packages-dist/platform-server/testing/index.js',
entry: '../../../dist/packages-dist/platform-server/@angular/platform-server/testing.es5.js',
dest: '../../../dist/packages-dist/platform-server/bundles/platform-server-testing.umd.js',
format: 'umd',
moduleName: 'ng.platformServer.testing',

View File

@ -7,9 +7,9 @@
*/
export default {
entry: '../../../dist/packages-dist/platform-webworker-dynamic/index.js',
entry: '../../dist/packages-dist/platform-webworker-dynamic/@angular/platform-webworker-dynamic.es5.js',
dest:
'../../../dist/packages-dist/platform-webworker-dynamic/bundles/platform-webworker-dynamic.umd.js',
'../../dist/packages-dist/platform-webworker-dynamic/bundles/platform-webworker-dynamic.umd.js',
format: 'umd',
moduleName: 'ng.platformWebworkerDynamic',
globals: {

View File

@ -7,8 +7,8 @@
*/
export default {
entry: '../../../dist/packages-dist/platform-webworker/index.js',
dest: '../../../dist/packages-dist/platform-webworker/bundles/platform-webworker.umd.js',
entry: '../../dist/packages-dist/platform-webworker/@angular/platform-webworker.es5.js',
dest: '../../dist/packages-dist/platform-webworker/bundles/platform-webworker.umd.js',
format: 'umd',
moduleName: 'ng.platformWebworker',
globals: {

View File

@ -7,8 +7,8 @@
*/
export default {
entry: '../../../dist/packages-dist/router/@angular/index.js',
dest: '../../../dist/packages-dist/router/bundles/router.umd.js',
entry: '../../dist/packages-dist/router/@angular/router.es5.js',
dest: '../../dist/packages-dist/router/bundles/router.umd.js',
format: 'umd',
moduleName: 'ng.router',
globals: {

View File

@ -7,7 +7,7 @@
*/
export default {
entry: '../../../dist/packages-dist/router/testing/index.js',
entry: '../../../dist/packages-dist/router/@angular/router/testing.es5.js',
dest: '../../../dist/packages-dist/router/bundles/router-testing.umd.js',
format: 'umd',
moduleName: 'ng.router.testing',

View File

@ -7,7 +7,7 @@
*/
export default {
entry: '../../../dist/packages-dist/router/upgrade.js',
entry: '../../../dist/packages-dist/router/@angular/router/upgrade.es5.js',
dest: '../../../dist/packages-dist/router/bundles/router-upgrade.umd.js',
format: 'umd',
moduleName: 'ng.router.upgrade',

View File

@ -7,8 +7,8 @@
*/
export default {
entry: '../../../dist/packages-dist/upgrade/index.js',
dest: '../../../dist/packages-dist/upgrade/bundles/upgrade.umd.js',
entry: '../../dist/packages-dist/upgrade/@angular/upgrade.es5.js',
dest: '../../dist/packages-dist/upgrade/bundles/upgrade.umd.js',
format: 'umd',
moduleName: 'ng.upgrade',
globals: {

View File

@ -7,7 +7,7 @@
*/
export default {
entry: '../../../dist/packages-dist/upgrade/static.js',
entry: '../../../dist/packages-dist/upgrade/@angular/upgrade/static.es5.js',
dest: '../../../dist/packages-dist/upgrade/bundles/upgrade-static.umd.js',
format: 'umd',
moduleName: 'ng.upgrade.static',