Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit 5388de3

Browse files
committed
use single entry point for both babel and traceur
1 parent 7c08bc6 commit 5388de3

File tree

5 files changed

+23
-29
lines changed

5 files changed

+23
-29
lines changed

index.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
var System = require('./dist/es6-module-loader.src');
2+
3+
System.transpiler = 'traceur';
4+
try {
5+
System.paths.traceur = require.resolve('traceur/bin/traceur.js');
6+
}
7+
catch(e) {}
8+
try {
9+
System.paths.babel = require.resolve('babel-core/browser.js');
10+
}
11+
catch(e) {}
12+
try {
13+
System.paths.babel = System.paths.babel || require.resolve('babel/browser.js');
14+
}
15+
catch(e) {}
16+
17+
module.exports = {
18+
Loader: global.LoaderPolyfill,
19+
System: System
20+
};

lib/index-babel.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

lib/index-traceur.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/_node-babel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ require('./_helper');
66

77
require('regenerator/runtime');
88

9-
global.System = require('../lib/index-babel').System;
9+
global.System = require('../index').System;
10+
global.System.transpiler = 'babel';
1011

1112
require('./system.spec');
1213

test/_node-traceur.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ global.expect = require('expect.js');
44

55
require('./_helper');
66

7-
global.System = require('../lib/index-traceur').System;
8-
9-
System.parser = 'traceur';
7+
global.System = require('../index').System;
108

119
require('./system.spec');
1210

0 commit comments

Comments
 (0)