Skip to content

Commit 988e1af

Browse files
jasonadenbenlesh
authored andcommitted
feat(package): rxjs distribution now supports main, module and es2015 keys in package.json
* refactor(package): change distribution to support main, module, es2015 keys in package.json * refactor(package): re-target from dist/cjs to dist/packages as the new npm published dir
1 parent 7bb8280 commit 988e1af

File tree

174 files changed

+363
-279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+363
-279
lines changed

.make-packages.js

+102-25
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,113 @@
1-
var pkg = require('./package.json');
2-
var fs = require('fs');
3-
var mkdirp = require('mkdirp');
4-
var path = require('path');
5-
var licenseTool = require('./tools/add-license-to-file');
6-
var addLicenseToFile = licenseTool.addLicenseToFile;
7-
var addLicenseTextToFile = licenseTool.addLicenseTextToFile;
1+
"use strict";
2+
3+
let pkg = require('./package.json');
4+
let fs = require('fs-extra');
5+
let mkdirp = require('mkdirp');
6+
let path = require('path');
7+
let klawSync = require('klaw-sync');
8+
let licenseTool = require('./tools/add-license-to-file');
9+
let addLicenseToFile = licenseTool.addLicenseToFile;
10+
let addLicenseTextToFile = licenseTool.addLicenseTextToFile;
11+
12+
const ROOT = 'dist/';
13+
const CJS_ROOT = ROOT + 'cjs/';
14+
const ESM5_ROOT = ROOT + 'esm5/';
15+
const ESM2015_ROOT = ROOT + 'esm2015/';
16+
const UMD_ROOT = ROOT + 'global/';
17+
const TYPE_ROOT = ROOT + 'typings/';
18+
const PKG_ROOT = ROOT + 'package/';
19+
const CJS_PKG = PKG_ROOT + '_cjs/';
20+
const ESM5_PKG = PKG_ROOT + '_esm5/';
21+
const ESM2015_PKG = PKG_ROOT + '_esm2015/';
22+
const UMD_PKG = PKG_ROOT + 'bundles/';
23+
const TYPE_PKG = PKG_ROOT + '_typings/';
24+
825

926
// License info for minified files
10-
var licenseUrl = 'https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt';
11-
var license = 'Apache License 2.0 ' + licenseUrl;
27+
let licenseUrl = 'https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt';
28+
let license = 'Apache License 2.0 ' + licenseUrl;
1229

1330
delete pkg.scripts;
31+
fs.removeSync(PKG_ROOT);
1432

15-
var cjsPkg = Object.assign({}, pkg, {
33+
let rootPackageJson = Object.assign({}, pkg, {
1634
name: 'rxjs',
17-
main: 'Rx.js',
18-
typings: 'Rx.d.ts'
35+
main: './_cjs/Rx.js',
36+
module: './_esm5/Rx.js',
37+
es2015: './_esm2015/Rx.js',
38+
typings: './_typings/Rx.d.ts'
39+
});
40+
41+
// Read the files and create package.json files for each. This allows Node,
42+
// Webpack, and any other tool to resolve using the "main", "module", or
43+
// other keys we add to package.json.
44+
klawSync(CJS_ROOT, {
45+
nodir: true,
46+
filter: function(item) {
47+
return item.path.endsWith('.js');
48+
}
49+
})
50+
.map(item => item.path)
51+
.map(path => path.slice((`${__dirname}/${CJS_ROOT}`).length))
52+
.forEach(fileName => {
53+
// Get the name of the directory to create
54+
let parentDirectory = path.dirname(fileName);
55+
// Get the name of the file to be the new directory
56+
let directory = fileName.slice(0, fileName.length - 3);
57+
let targetFileName = path.basename(directory);
58+
59+
fs.ensureDirSync(PKG_ROOT + parentDirectory);
60+
61+
// For "index.js" files, these are re-exports and need a package.json
62+
// in-place rather than in a directory
63+
if (targetFileName !== "index") {
64+
fs.ensureDirSync(PKG_ROOT + directory);
65+
fs.writeJsonSync(PKG_ROOT + directory + '/package.json', {
66+
main: path.relative(PKG_ROOT + directory, CJS_PKG + directory) + '.js',
67+
module: path.relative(PKG_ROOT + directory, ESM5_PKG + directory) + '.js',
68+
es2015: path.relative(PKG_ROOT + directory, ESM2015_PKG + directory) + '.js',
69+
typings: path.relative(PKG_ROOT + directory, TYPE_PKG + directory) + '.d.ts'
70+
});
71+
} else {
72+
// If targeting an "index", there is no directory
73+
directory = directory.split('/').slice(0, -1).join('/');
74+
fs.writeJsonSync(PKG_ROOT + directory + '/package.json', {
75+
main: path.relative(PKG_ROOT + directory, CJS_PKG + directory + '/index.js'),
76+
module: path.relative(PKG_ROOT + directory, ESM5_PKG + directory + '/index.js'),
77+
es2015: path.relative(PKG_ROOT + directory, ESM2015_PKG + directory + '/index.js'),
78+
typings: path.relative(PKG_ROOT + directory, TYPE_PKG + directory + '/index.d.ts')
79+
});
80+
}
1981
});
2082

21-
fs.writeFileSync('dist/cjs/package.json', JSON.stringify(cjsPkg, null, 2));
22-
fs.writeFileSync('dist/cjs/LICENSE.txt', fs.readFileSync('./LICENSE.txt').toString());
23-
fs.writeFileSync('dist/cjs/README.md', fs.readFileSync('./README.md').toString());
83+
// Make the distribution folder
84+
mkdirp.sync(PKG_ROOT);
85+
86+
// Copy over the sources
87+
copySources('src/', PKG_ROOT + 'src/');
88+
copySources(CJS_ROOT, CJS_PKG);
89+
copySources(ESM5_ROOT, ESM5_PKG);
90+
copySources(ESM2015_ROOT, ESM2015_PKG);
91+
fs.copySync(TYPE_ROOT, TYPE_PKG);
2492

25-
// Bundles for CJS only
26-
mkdirp.sync('dist/cjs/bundles');
27-
// UMD bundles
28-
fs.writeFileSync('dist/cjs/bundles/Rx.js', fs.readFileSync('dist/global/Rx.js').toString());
29-
fs.writeFileSync('dist/cjs/bundles/Rx.min.js', fs.readFileSync('dist/global/Rx.min.js').toString());
30-
fs.writeFileSync('dist/cjs/bundles/Rx.min.js.map', fs.readFileSync('dist/global/Rx.min.js.map').toString());
93+
fs.writeJsonSync(PKG_ROOT + 'package.json', rootPackageJson);
3194

95+
fs.copySync(UMD_ROOT, UMD_PKG);
3296
// Add licenses to tops of bundles
33-
addLicenseToFile('LICENSE.txt', 'dist/cjs/bundles/Rx.js');
34-
addLicenseTextToFile(license, 'dist/cjs/bundles/Rx.min.js');
35-
addLicenseToFile('LICENSE.txt', 'dist/global/Rx.js');
36-
addLicenseTextToFile(license, 'dist/global/Rx.min.js');
97+
addLicenseToFile('LICENSE.txt', UMD_PKG + 'Rx.js');
98+
addLicenseTextToFile(license, UMD_PKG + 'Rx.min.js');
99+
addLicenseToFile('LICENSE.txt', UMD_PKG + 'Rx.js');
100+
addLicenseTextToFile(license, UMD_PKG + 'Rx.min.js');
101+
102+
// Copy over the ESM5 files
103+
fs.copySync(ESM5_ROOT, ESM5_PKG);
104+
105+
function copySources(rootDir, packageDir, packageJson) {
106+
// Copy over the CommonJS files
107+
fs.copySync(rootDir, packageDir);
108+
fs.copySync('./LICENSE.txt', packageDir + 'LICENSE.txt');
109+
fs.copySync('./README.md', packageDir + 'README.md');
110+
if (packageJson) {
111+
fs.writeJsonSync(packageDir + 'package.json', packageJson);
112+
}
113+
}

.markdown-doctest-setup.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module.exports = {
4545

4646
regexRequire: {
4747
'rxjs/(.*)': function (_, moduleName) {
48-
return require(__dirname + '/dist/cjs/' + moduleName);
48+
return require(__dirname + '/dist/package/' + moduleName);
4949
}
5050
},
5151

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = require('./dist/cjs/Rx');
1+
module.exports = require('./dist/package/Rx');

package.json

+27-20
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,26 @@
2121
"scripts-info": {
2222
"info": "List available script",
2323
"build_all": "Build all packages (ES6, CJS, UMD) and generate packages",
24-
"build_cjs": "Build CJS package with clean up existing build, copy source into dist",
25-
"build_es6": "Build ES6 package with clean up existing build, copy source into dist",
24+
"build_cjs": "Build CJS package with clean up existing build",
25+
"build_esm5": "Build ESM/ES5 package with clean up existing build",
26+
"build_esm2015": "Build ESM/ES2015 package with clean up existing build",
2627
"build_closure_core": "Minify Global core build using closure compiler",
2728
"build_global": "Build Global package, then minify build",
2829
"build_perf": "Build CJS & Global build, run macro performance test",
2930
"build_test": "Build CJS package & test spec, execute mocha test runner",
3031
"build_cover": "Run lint to current code, build CJS & test spec, execute test coverage",
31-
"build_docs": "Build ES6 & global package, create documentation using it",
32+
"build_docs": "Build ESM2015 & global package, create documentation using it",
3233
"build_spec": "Build test specs",
3334
"check_circular_dependencies": "Check codebase has circular dependencies",
3435
"clean_spec": "Clean up existing test spec build output",
3536
"clean_dist_cjs": "Clean up existing CJS package output",
36-
"clean_dist_es6": "Clean up existing ES6 package output",
37+
"clean_dist_esm5": "Clean up existing ESM/ES5 package output",
38+
"clean_dist_esm2015": "Clean up existing ESM/ES2015 package output",
3739
"clean_dist_global": "Clean up existing Global package output",
3840
"commit": "Run git commit wizard",
3941
"compile_dist_cjs": "Compile codebase into CJS module",
40-
"compile_module_es6": "Compile codebase into ES6",
42+
"compile_module_esm5": "Compile codebase into ESM/ES5",
43+
"compile_module_esm2015": "Compile codebase into ESM/ES2015",
4144
"cover": "Execute test coverage",
4245
"lint_perf": "Run lint against performance test suite",
4346
"lint_spec": "Run lint against test spec",
@@ -55,29 +58,32 @@
5558
"precommit": "lint-staged",
5659
"commitmsg": "validate-commit-msg",
5760
"info": "npm-scripts-info",
58-
"build_all": "npm-run-all build_cjs build_global generate_packages",
59-
"build_cjs": "npm-run-all clean_dist_cjs copy_src_cjs compile_dist_cjs",
60-
"build_es6": "npm-run-all clean_dist_es6 copy_src_es6 compile_module_es6",
61-
"build_es6_for_docs": "npm-run-all clean_dist_es6 copy_src_es6 compile_dist_es6_for_docs",
61+
"build_all": "npm-run-all clean_dist build_cjs build_esm5 build_esm2015 build_umd generate_packages",
62+
"build_cjs": "npm-run-all clean_dist_cjs compile_dist_cjs",
63+
"build_esm5": "npm-run-all clean_dist_esm5 compile_dist_esm5",
64+
"build_esm2015": "npm-run-all clean_dist_esm2015 compile_module_esm2015",
65+
"build_esm2015_for_docs": "npm-run-all clean_dist_esm2015 compile_dist_esm2015_for_docs",
6266
"build_closure_core": "node ./tools/make-closure-core.js",
63-
"build_global": "npm-run-all clean_dist_global build_es6 && mkdirp ./dist/global && node ./tools/make-umd-bundle.js && npm-run-all build_closure_core clean_dist_es6",
67+
"build_global": "npm-run-all clean_dist_global build_esm5 && mkdirp ./dist/global && node ./tools/make-umd-bundle.js && npm-run-all build_closure_core clean_dist_esm5",
68+
"build_umd": "npm-run-all clean_dist_global && mkdirp ./dist/global && node ./tools/make-umd-bundle.js && npm-run-all build_closure_core",
6469
"build_perf": "webdriver-manager update && npm-run-all build_cjs build_global perf",
65-
"build_test": "shx rm -rf ./dist/ && npm-run-all build_cjs clean_spec build_spec test_mocha",
66-
"build_cover": "shx rm -rf ./dist/ && npm-run-all build_cjs build_spec cover",
67-
"build_docs": "npm-run-all build_global build_es6_for_docs build_cjs clean_spec build_spec tests2png decision_tree_widget && esdoc -c esdoc.json && npm-run-all clean_dist_es6",
70+
"build_test": "shx rm -rf ./dist/ && npm-run-all build_all clean_spec build_spec test_mocha",
71+
"build_cover": "shx rm -rf ./dist/ && npm-run-all build_all build_spec cover",
72+
"build_docs": "npm-run-all build_global build_esm2015_for_docs build_cjs clean_spec build_spec tests2png decision_tree_widget && esdoc -c esdoc.json && npm-run-all clean_dist_esm2015",
6873
"build_spec": "tsc --project ./spec --pretty",
6974
"build_spec_browser": "webpack --config spec/support/webpack.mocha.config.js",
7075
"check_circular_dependencies": "madge ./dist/cjs --circular",
7176
"clean_spec": "shx rm -rf spec-js",
77+
"clean_dist": "shx rm -rf ./dist",
7278
"clean_dist_cjs": "shx rm -rf ./dist/cjs",
73-
"clean_dist_es6": "shx rm -rf ./dist/es6",
79+
"clean_dist_esm5": "shx rm -rf ./dist/esm5",
80+
"clean_dist_esm2015": "shx rm -rf ./dist/esm2015",
7481
"clean_dist_global": "shx rm -rf ./dist/global",
75-
"copy_src_cjs": "mkdirp ./dist/cjs/src && shx cp -r ./src/* ./dist/cjs/src",
76-
"copy_src_es6": "mkdirp ./dist/es6/src && shx cp -r ./src/* ./dist/es6/src",
7782
"commit": "git-cz",
78-
"compile_dist_cjs": "tsc ./dist/cjs/src/Rx.ts ./dist/cjs/src/add/observable/of.ts -m commonjs --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/cjs --target ES5 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node",
79-
"compile_module_es6": "tsc ./dist/es6/src/Rx.ts ./dist/es6/src/add/observable/of.ts -m es2015 --sourceMap --outDir ./dist/es6 --target ES5 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node --noEmitHelpers --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom ",
80-
"compile_dist_es6_for_docs": "tsc ./dist/es6/src/Rx.ts ./dist/es6/src/add/observable/of.ts ./dist/es6/src/MiscJSDoc.ts -m es2015 --sourceMap --outDir ./dist/es6 --target ES6 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node",
83+
"compile_dist_cjs": "tsc ./src/Rx.ts ./src/add/observable/of.ts -m commonjs --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/cjs --target ES5 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node -d --declarationDir ./dist/typings",
84+
"compile_dist_esm5": "tsc ./src/Rx.ts ./src/add/observable/of.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm5 --target ES5 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node",
85+
"compile_module_esm2015": "tsc ./src/Rx.ts ./src/add/observable/of.ts -m es2015 --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/esm2015 --target es2015 --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node",
86+
"compile_dist_esm2015_for_docs": "tsc ./src/Rx.ts ./src/add/observable/of.ts ./src/MiscJSDoc.ts -m es2015 --sourceMap --outDir ./dist/es6 --target es2015 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --noImplicitThis --suppressImplicitAnyIndexErrors --moduleResolution node",
8187
"cover": "shx rm -rf dist/cjs && tsc src/Rx.ts src/add/observable/of.ts -m commonjs --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --outDir dist/cjs --sourceMap --target ES5 -d && nyc --reporter=lcov --reporter=html --exclude=spec/support/**/* --exclude=spec-js/**/* --exclude=node_modules mocha --opts spec/support/default.opts spec-js",
8288
"decision_tree_widget": "cd doc/decision-tree-widget && npm run build && cd ../..",
8389
"doctoc": "doctoc CONTRIBUTING.md",
@@ -168,6 +174,7 @@
168174
"gzip-size": "^3.0.0",
169175
"http-server": "^0.9.0",
170176
"husky": "^0.13.3",
177+
"klaw-sync": "^3.0.0",
171178
"lint-staged": "3.2.5",
172179
"lodash": "^4.15.0",
173180
"madge": "^1.4.3",
@@ -204,7 +211,7 @@
204211
"engines": {
205212
"npm": ">=2.0.0"
206213
},
207-
"typings": "./dist/cjs/Rx.d.ts",
214+
"typings": "./dist/package/typings/Rx.d.ts",
208215
"dependencies": {
209216
"symbol-observable": "^1.0.1"
210217
}

perf/micro/immediate-scheduler/operators/distinct-keyselector.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var RxOld = require('rx');
2-
var RxNew = require('../../../../dist/cjs/Rx');
2+
var RxNew = require('../../../../dist/package/Rx');
33

44
module.exports = function (suite) {
55
var source = Array.from({ length: 25 }, function (_, i) { return { value: i % 3 }; });

perf/micro/immediate-scheduler/operators/distinct.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var RxOld = require('rx');
2-
var RxNew = require('../../../../dist/cjs/Rx');
2+
var RxNew = require('../../../../dist/package/Rx');
33

44
module.exports = function (suite) {
55
var source = Array.from({ length: 25 }, function (_, i) { return i % 3; });

spec/Notification-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {expect} from 'chai';
2-
import * as Rx from '../dist/cjs/Rx';
2+
import * as Rx from '../dist/package/Rx';
33

44
declare const expectObservable;
55
const Notification = Rx.Notification;

spec/Observable-spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {expect} from 'chai';
22
import * as sinon from 'sinon';
3-
import * as Rx from '../dist/cjs/Rx';
4-
import {TeardownLogic} from '../dist/cjs/Subscription';
3+
import * as Rx from '../dist/package/Rx';
4+
import {TeardownLogic} from '../dist/package/Subscription';
55
import marbleTestingSignature = require('./helpers/marble-testing'); // tslint:disable-line:no-require-imports
6-
import { map } from '../dist/cjs/operators';
6+
import { map } from '../dist/package/operators';
77

88
declare const { asDiagram, rxTestScheduler };
99
declare const cold: typeof marbleTestingSignature.cold;

spec/Scheduler-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {expect} from 'chai';
2-
import * as Rx from '../dist/cjs/Rx';
2+
import * as Rx from '../dist/package/Rx';
33

44
const Scheduler = Rx.Scheduler;
55

spec/Subject-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {expect} from 'chai';
2-
import * as Rx from '../dist/cjs/Rx';
2+
import * as Rx from '../dist/package/Rx';
33
import marbleTestingSignature = require('./helpers/marble-testing'); // tslint:disable-line:no-require-imports
44

55
declare const { time };

spec/Subscriber-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {expect} from 'chai';
22
import * as sinon from 'sinon';
3-
import * as Rx from '../dist/cjs/Rx';
3+
import * as Rx from '../dist/package/Rx';
44

55
const Subscriber = Rx.Subscriber;
66

spec/Subscription-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {expect} from 'chai';
2-
import * as Rx from '../dist/cjs/Rx';
2+
import * as Rx from '../dist/package/Rx';
33

44
const Observable = Rx.Observable;
55
const Subscription = Rx.Subscription;

spec/exports-spec.ts

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
import { expect } from 'chai';
2-
import { bindCallback } from '../dist/cjs/observable/bindCallback';
3-
import { bindNodeCallback } from '../dist/cjs/observable/bindNodeCallback';
4-
import { combineLatest } from '../dist/cjs/observable/combineLatest';
5-
import { concat } from '../dist/cjs/observable/concat';
6-
import { defer } from '../dist/cjs/observable/defer';
7-
import { empty } from '../dist/cjs/observable/empty';
8-
import { forkJoin } from '../dist/cjs/observable/forkJoin';
9-
import { from } from '../dist/cjs/observable/from';
10-
import { fromEvent } from '../dist/cjs/observable/fromEvent';
11-
import { fromEventPattern } from '../dist/cjs/observable/fromEventPattern';
12-
import { fromPromise } from '../dist/cjs/observable/fromPromise';
13-
import { _if } from '../dist/cjs/observable/if';
14-
import { interval } from '../dist/cjs/observable/interval';
15-
import { merge } from '../dist/cjs/observable/merge';
16-
import { never } from '../dist/cjs/observable/never';
17-
import { of } from '../dist/cjs/observable/of';
18-
import { onErrorResumeNext } from '../dist/cjs/observable/onErrorResumeNext';
19-
import { pairs } from '../dist/cjs/observable/pairs';
20-
import { race } from '../dist/cjs/observable/race';
21-
import { range } from '../dist/cjs/observable/range';
22-
import { _throw } from '../dist/cjs/observable/throw';
23-
import { timer } from '../dist/cjs/observable/timer';
24-
import { using } from '../dist/cjs/observable/using';
25-
import { zip } from '../dist/cjs/observable/zip';
26-
import * as Rx from '../dist/cjs/Rx';
2+
import { bindCallback } from '../dist/package/observable/bindCallback';
3+
import { bindNodeCallback } from '../dist/package/observable/bindNodeCallback';
4+
import { combineLatest } from '../dist/package/observable/combineLatest';
5+
import { concat } from '../dist/package/observable/concat';
6+
import { defer } from '../dist/package/observable/defer';
7+
import { empty } from '../dist/package/observable/empty';
8+
import { forkJoin } from '../dist/package/observable/forkJoin';
9+
import { from } from '../dist/package/observable/from';
10+
import { fromEvent } from '../dist/package/observable/fromEvent';
11+
import { fromEventPattern } from '../dist/package/observable/fromEventPattern';
12+
import { fromPromise } from '../dist/package/observable/fromPromise';
13+
import { _if } from '../dist/package/observable/if';
14+
import { interval } from '../dist/package/observable/interval';
15+
import { merge } from '../dist/package/observable/merge';
16+
import { never } from '../dist/package/observable/never';
17+
import { of } from '../dist/package/observable/of';
18+
import { onErrorResumeNext } from '../dist/package/observable/onErrorResumeNext';
19+
import { pairs } from '../dist/package/observable/pairs';
20+
import { race } from '../dist/package/observable/race';
21+
import { range } from '../dist/package/observable/range';
22+
import { _throw } from '../dist/package/observable/throw';
23+
import { timer } from '../dist/package/observable/timer';
24+
import { using } from '../dist/package/observable/using';
25+
import { zip } from '../dist/package/observable/zip';
26+
import * as Rx from '../dist/package/Rx';
2727

2828
describe('exports', () => {
2929
it('should have rxjs/observable/bindCallback', () => {

spec/helpers/marble-testing.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
///<reference path='../../typings/index.d.ts'/>
2-
import {Observable} from '../../dist/cjs/Observable';
3-
import {SubscriptionLog} from '../../dist/cjs/testing/SubscriptionLog';
4-
import {ColdObservable} from '../../dist/cjs/testing/ColdObservable';
5-
import {HotObservable} from '../../dist/cjs/testing/HotObservable';
6-
import {TestScheduler, observableToBeFn, subscriptionLogsToBeFn} from '../../dist/cjs/testing/TestScheduler';
2+
import {Observable} from '../../dist/package/Observable';
3+
import {SubscriptionLog} from '../../dist/package/testing/SubscriptionLog';
4+
import {ColdObservable} from '../../dist/package/testing/ColdObservable';
5+
import {HotObservable} from '../../dist/package/testing/HotObservable';
6+
import {TestScheduler, observableToBeFn, subscriptionLogsToBeFn} from '../../dist/package/testing/TestScheduler';
77

88
declare const global: any;
99

0 commit comments

Comments
 (0)