diff --git a/.make-packages.js b/.make-packages.js index 1873aa1264..f6eb8d0524 100644 --- a/.make-packages.js +++ b/.make-packages.js @@ -40,7 +40,9 @@ fs.removeSync(PKG_ROOT); let rootPackageJson = Object.assign({}, pkg, { name: 'rxjs', main: './index.js', - typings: './index.d.ts' + typings: './index.d.ts', + module: './_esm5/index.js', + es2015: './_esm2015/index.js' }); // Get a list of the file names. Sort in reverse order so re-export files @@ -102,6 +104,10 @@ copySources(ESM2015_ROOT, ESM2015_PKG, true); fs.copySync('./tsconfig.json', PKG_ROOT + 'src/tsconfig.json'); fs.writeJsonSync(PKG_ROOT + 'package.json', rootPackageJson); +fs.copySync('src/operators/package.json', PKG_ROOT + '/operators/package.json'); +fs.copySync('src/ajax/package.json', PKG_ROOT + '/ajax/package.json'); +fs.copySync('src/websocket/package.json', PKG_ROOT + '/websocket/package.json'); +fs.copySync('src/testing/package.json', PKG_ROOT + '/testing/package.json'); if (fs.existsSync(UMD_ROOT)) { fs.copySync(UMD_ROOT, UMD_PKG); diff --git a/src/ajax/package.json b/src/ajax/package.json new file mode 100644 index 0000000000..280045cdf7 --- /dev/null +++ b/src/ajax/package.json @@ -0,0 +1,7 @@ +{ + "name": "rxjs/ajax", + "typings": "./index.d.ts", + "main": "./index.js", + "module": "../_esm5/ajax/index.js", + "es2015": "../_esm2015/ajax/index.js" +} diff --git a/src/operators/package.json b/src/operators/package.json new file mode 100644 index 0000000000..ec30a83c76 --- /dev/null +++ b/src/operators/package.json @@ -0,0 +1,7 @@ +{ + "name": "rxjs/operators", + "typings": "./index.d.ts", + "main": "./index.js", + "module": "../_esm5/operators/index.js", + "es2015": "../_esm2015/operators/index.js" +} diff --git a/src/testing/package.json b/src/testing/package.json new file mode 100644 index 0000000000..7fe97df1c9 --- /dev/null +++ b/src/testing/package.json @@ -0,0 +1,7 @@ +{ + "name": "rxjs/testing", + "typings": "./index.d.ts", + "main": "./index.js", + "module": "../_esm5/testing/index.js", + "es2015": "../_esm2015/testing/index.js" +} diff --git a/src/websocket/package.json b/src/websocket/package.json new file mode 100644 index 0000000000..13c537c4c5 --- /dev/null +++ b/src/websocket/package.json @@ -0,0 +1,7 @@ +{ + "name": "rxjs/websocket", + "typings": "./index.d.ts", + "main": "./index.js", + "module": "../_esm5/websocket/index.js", + "es2015": "../_esm2015/websocket/index.js" +}