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/upgrade/static",
|
||||
"typings": "../static.d.ts",
|
||||
"typings": "./index.d.ts",
|
||||
"main": "../bundles/upgrade-static.umd.js",
|
||||
"module": "../@angular/upgrade/static.es5.js",
|
||||
"es2015": "../@angular/upgrade/static.js"
|
||||
"module": "../esm5/static/index.js",
|
||||
"es2015": "../esm15/static/index.js"
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Entry point for all public APIs of the upgrade/static package, allowing
|
||||
* Entry point for all public APIs of this package. allowing
|
||||
* Angular 1 and Angular 2+ to run side by side in the same application.
|
||||
*/
|
||||
export {getAngularLib, setAngularLib} from './src/common/angular1';
|
||||
|
@ -7,18 +7,19 @@
|
||||
*/
|
||||
|
||||
import resolve from 'rollup-plugin-node-resolve';
|
||||
import sourcemaps from 'rollup-plugin-sourcemaps';
|
||||
|
||||
const globals = {
|
||||
'@angular/core': 'ng.core'
|
||||
};
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/upgrade/@angular/upgrade/static.es5.js',
|
||||
entry: '../../../dist/packages-dist/upgrade/esm5/static/index.js',
|
||||
dest: '../../../dist/packages-dist/upgrade/bundles/upgrade-static.umd.js',
|
||||
format: 'umd',
|
||||
exports: 'named',
|
||||
moduleName: 'ng.upgrade.static',
|
||||
plugins: [resolve()],
|
||||
plugins: [resolve(), sourcemaps()],
|
||||
external: Object.keys(globals),
|
||||
globals: globals
|
||||
};
|
||||
|
@ -1,18 +1,23 @@
|
||||
{
|
||||
"extends": "../tsconfig-build",
|
||||
"extends": "../tsconfig-build.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"baseUrl": ".",
|
||||
"rootDir": "../",
|
||||
"paths": {
|
||||
"@angular/core": ["../../dist/packages/core"],
|
||||
"@angular/common": ["../../dist/packages/common"],
|
||||
"@angular/platform-browser": ["../../dist/packages/platform-browser"],
|
||||
"@angular/platform-browser-dynamic": ["../../dist/packages/platform-browser-dynamic"]
|
||||
}
|
||||
"@angular/core": ["../../../dist/packages/core"],
|
||||
"@angular/common": ["../../../dist/packages/common"],
|
||||
"@angular/platform-browser": ["../../../dist/packages/platform-browser"],
|
||||
"@angular/platform-browser-dynamic": ["../../../dist/packages/platform-browser-dynamic"]
|
||||
},
|
||||
"outDir": "../../../dist/packages/upgrade"
|
||||
},
|
||||
|
||||
"files": [
|
||||
"public_api.ts",
|
||||
"../../../node_modules/zone.js/dist/zone.js.d.ts"
|
||||
],
|
||||
|
||||
"angularCompilerOptions": {
|
||||
"flatModuleOutFile": "index.js",
|
||||
"flatModuleId": "@angular/upgrade/static"
|
||||
|
Reference in New Issue
Block a user