build: publish tree of files rather than FESMs (#18541)
* Remove now unnecessary portions of build. * Add a compilePackageES5 method to build ES5 from sources * Rework all package.json and rollup config files to new format * Remove "extends" from tsconfig-build.json files and fixup compilation roots PR Close #18541
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@angular/common/http",
|
||||
"typings": "../http.d.ts",
|
||||
"typings": "./index.d.ts",
|
||||
"main": "../bundles/common-http.umd.js",
|
||||
"module": "../@angular/common/http.es5.js",
|
||||
"es2015": "../@angular/common/http.js"
|
||||
"module": "../esm5/http/index.js",
|
||||
"es2015": "../esm15/http/index.js"
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
const globals = {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/platform-browser': 'ng.platformBrowser',
|
||||
'@angular/common': 'ng.common',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/Subject': 'Rx',
|
||||
|
||||
@ -20,7 +21,7 @@ const globals = {
|
||||
};
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/common/@angular/common/http.es5.js',
|
||||
entry: '../../../dist/packages-dist/common/esm5/http/index.js',
|
||||
dest: '../../../dist/packages-dist/common/bundles/common-http.umd.js',
|
||||
format: 'umd',
|
||||
exports: 'named',
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@angular/common/http/testing",
|
||||
"typings": "../testing.d.ts",
|
||||
"typings": "./index.d.ts",
|
||||
"main": "../../bundles/common-http-testing.umd.js",
|
||||
"module": "../../@angular/common/http/testing.es5.js",
|
||||
"es2015": "../../@angular/common/http/testing.js"
|
||||
"module": "../../esm5/http/testing/index.js",
|
||||
"es2015": "../../esm15/http/testing/index.js"
|
||||
}
|
||||
|
@ -7,10 +7,12 @@
|
||||
*/
|
||||
|
||||
import resolve from 'rollup-plugin-node-resolve';
|
||||
import sourcemaps from 'rollup-plugin-sourcemaps';
|
||||
|
||||
const globals = {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/platform-browser': 'ng.platformBrowser',
|
||||
'@angular/common': 'ng.common',
|
||||
'@angular/common/http': 'ng.common.http',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/ReplaySubject': 'Rx',
|
||||
@ -18,12 +20,12 @@ const globals = {
|
||||
};
|
||||
|
||||
export default {
|
||||
entry: '../../../../dist/packages-dist/common/@angular/common/http/testing.es5.js',
|
||||
entry: '../../../../dist/packages-dist/common/esm5/http/testing/index.js',
|
||||
dest: '../../../../dist/packages-dist/common/bundles/common-http-testing.umd.js',
|
||||
format: 'umd',
|
||||
exports: 'named',
|
||||
moduleName: 'ng.common.http.testing',
|
||||
plugins: [resolve()],
|
||||
plugins: [resolve(), sourcemaps()],
|
||||
external: Object.keys(globals),
|
||||
globals: globals
|
||||
};
|
||||
|
@ -1,28 +1,22 @@
|
||||
{
|
||||
"extends": "../tsconfig-build.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "../../../../dist/packages/common/http/testing",
|
||||
"rootDir": "../../",
|
||||
"paths": {
|
||||
"@angular/core": ["../../../../dist/packages/core"],
|
||||
"@angular/common": ["../../../../dist/packages/common"],
|
||||
"@angular/common/http": ["../../../../dist/packages/common/http"],
|
||||
"@angular/platform-browser": ["../../../../dist/packages/platform-browser"]
|
||||
},
|
||||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es2015",
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2015", "dom"]
|
||||
"outDir": "../../../../dist/packages/common"
|
||||
},
|
||||
|
||||
"files": [
|
||||
"public_api.ts"
|
||||
],
|
||||
|
||||
"angularCompilerOptions": {
|
||||
"annotateForClosureCompiler": true,
|
||||
"strictMetadataEmit": true,
|
||||
|
@ -1,26 +1,20 @@
|
||||
{
|
||||
"extends": "../tsconfig-build.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "../../../dist/packages/common/http",
|
||||
"rootDir": "../",
|
||||
"paths": {
|
||||
"@angular/common": ["../../../dist/packages/common"],
|
||||
"@angular/core": ["../../../dist/packages/core"]
|
||||
},
|
||||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es2015",
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2015", "dom"]
|
||||
"outDir": "../../../dist/packages/common"
|
||||
},
|
||||
|
||||
"files": [
|
||||
"public_api.ts"
|
||||
],
|
||||
|
||||
"angularCompilerOptions": {
|
||||
"annotateForClosureCompiler": true,
|
||||
"strictMetadataEmit": true,
|
||||
|
Reference in New Issue
Block a user