diff --git a/.make-packages.js b/.make-packages.js index f6eb8d0524d..617fb8a81b1 100644 --- a/.make-packages.js +++ b/.make-packages.js @@ -112,10 +112,10 @@ fs.copySync('src/testing/package.json', PKG_ROOT + '/testing/package.json'); if (fs.existsSync(UMD_ROOT)) { fs.copySync(UMD_ROOT, UMD_PKG); // Add licenses to tops of bundles - addLicenseToFile('LICENSE.txt', UMD_PKG + 'Rx.js'); - addLicenseTextToFile(license, UMD_PKG + 'Rx.min.js'); - addLicenseToFile('LICENSE.txt', UMD_PKG + 'Rx.js'); - addLicenseTextToFile(license, UMD_PKG + 'Rx.min.js'); + addLicenseToFile('LICENSE.txt', UMD_PKG + 'rxjs.umd.js'); + addLicenseTextToFile(license, UMD_PKG + 'rxjs.umd.min.js'); + addLicenseToFile('LICENSE.txt', UMD_PKG + 'rxjs.umd.js'); + addLicenseTextToFile(license, UMD_PKG + 'rxjs.umd.min.js'); } function copySources(rootDir, packageDir, ignoreMissing) { diff --git a/src/internal/umd.ts b/src/internal/umd.ts index 4c96246dc52..04454f30888 100644 --- a/src/internal/umd.ts +++ b/src/internal/umd.ts @@ -3,20 +3,20 @@ */ /* rxjs */ -export * from '../'; +export * from '../index'; /* rxjs.operators */ -import * as _operators from '../operators'; +import * as _operators from '../operators/index'; export const operators = _operators; /* rxjs.testing */ -import * as _testing from '../testing'; +import * as _testing from '../testing/index'; export const testing = _testing; /* rxjs.ajax */ -import * as _ajax from '../ajax'; +import * as _ajax from '../ajax/index'; export const ajax = _ajax; /* rxjs.websocket */ -import * as _websocket from '../websocket'; +import * as _websocket from '../websocket/index'; export const websocket = _websocket; diff --git a/tools/make-closure-core.js b/tools/make-closure-core.js index f507a0bf1ed..41d94d836b2 100644 --- a/tools/make-closure-core.js +++ b/tools/make-closure-core.js @@ -1,7 +1,7 @@ var compiler = require('google-closure-compiler-js').compile; var fs = require('fs'); -var source = fs.readFileSync('dist/global/Rx.js', 'utf8'); +var source = fs.readFileSync('dist/global/rxjs.umd.js', 'utf8'); var compilerFlags = { jsCode: [{src: source}], @@ -11,5 +11,5 @@ var compilerFlags = { var output = compiler(compilerFlags); -fs.writeFileSync('dist/global/Rx.min.js', output.compiledCode, 'utf8'); -fs.writeFileSync('dist/global/Rx.min.js.map', output.sourceMap, 'utf8'); \ No newline at end of file +fs.writeFileSync('dist/global/rxjs.umd.min.js', output.compiledCode, 'utf8'); +fs.writeFileSync('dist/global/rxjs.umd.min.js.map', output.sourceMap, 'utf8'); \ No newline at end of file diff --git a/tools/make-umd-bundle.js b/tools/make-umd-bundle.js index 85a740584ef..e76faf6c23b 100644 --- a/tools/make-umd-bundle.js +++ b/tools/make-umd-bundle.js @@ -10,7 +10,7 @@ var path = require('path'); var tslib = require('tslib'); rollup.rollup({ - entry: 'dist/esm5_for_rollup/internal/Rx.js', + entry: 'dist/esm5_for_rollup/internal/umd.js', plugins: [ rollupNodeResolve({ jsnext: true, @@ -25,10 +25,10 @@ rollup.rollup({ }).then(function (bundle) { var result = bundle.generate({ format: 'umd', - moduleName: 'Rx', + moduleName: 'rxjs', sourceMap: true }); - fs.writeFileSync('dist/global/Rx.js', result.code); - fs.writeFileSync('dist/global/Rx.js.map', result.map); + fs.writeFileSync('dist/global/rxjs.umd.js', result.code); + fs.writeFileSync('dist/global/rxjs.umd.js.map', result.map); }); diff --git a/tsconfig/tsconfig.base.json b/tsconfig/tsconfig.base.json index ba995654ee3..74674baaa74 100644 --- a/tsconfig/tsconfig.base.json +++ b/tsconfig/tsconfig.base.json @@ -13,6 +13,9 @@ // legacy entry-points "../dist/src/internal/Rx.ts", - "../dist/src/add/observable/of.ts" + "../dist/src/add/observable/of.ts", + + // umd entry-point + "../dist/src/internal/umd.ts", ] }