Skip to content

Commit

Permalink
feat(operators): rename __modules.ts to index.ts for tree-shaking
Browse files Browse the repository at this point in the history
Closes #52
  • Loading branch information
trxcllnt committed Oct 30, 2017
1 parent 76a4b4f commit 4184f39
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,10 @@ function _dir(target, format) { return path.join(releasesRootDir, ...(!format ?

function* combinations(_targets, _modules) {

const targets = known(knownTargets, _targets || [`all`]);
const modules = known(knownModules, _modules || [`all`]);
const targets = known(knownTargets, _targets || (_targets = [`all`]));
const modules = known(knownModules, _modules || (_modules = [`all`]));

if (targets[0] === `all` && modules[0] === `all`) {
if (_targets[0] === `all` && _modules[0] === `all`) {
yield [`ts`, ``];
yield [`ix`, ``];
}
Expand Down
16 changes: 10 additions & 6 deletions src/Ix.internal.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import * as iterableX from './iterable/__modules';
import * as iterableXPipe from './iterable/pipe/__modules';
import * as asynciterableX from './asynciterable/__modules';
import * as asynciterableXPipe from './asynciterable/pipe/__modules';
export { iterableX as iterable, asynciterableX as asynciterable };
export { iterableXPipe as iterablePipe, asynciterableXPipe as asynciterablePipe };
/* `/index` required for closure compiler */
import * as iterableX from './iterable/index';
import * as iterableXPipe from './iterable/pipe/index';
import * as asynciterableX from './asynciterable/index';
import * as asynciterableXPipe from './asynciterable/pipe/index';

export { iterableX as iterable };
export { iterableXPipe as iterablePipe };
export { asynciterableX as asynciterable };
export { asynciterableXPipe as asynciterablePipe };

/* These declarations are needed for the closure/umd targets */
export declare namespace Symbol {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4184f39

Please sign in to comment.