This repository was archived by the owner on Jul 13, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 12 files changed +42
-29
lines changed Expand file tree Collapse file tree 12 files changed +42
-29
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ before_install:
14
14
script :
15
15
- grunt
16
16
- npm test
17
- - npm run test:browsers -- --polyfill
18
- - npm run test:browsers -- --saucelabs
19
- - npm run test:browsers -- --saucelabs --ie8
20
- - npm run test:browsers:perf
17
+ - npm run test:browser -- --polyfill
18
+ - npm run test:browser -- --saucelabs
19
+ - npm run test:browser -- --saucelabs --ie8
Original file line number Diff line number Diff line change @@ -21,22 +21,20 @@ var options = extend({
21
21
coverage : false
22
22
} , argv ) ;
23
23
24
- if ( options . ie8 ) {
24
+ if ( options . ie8 ) {
25
25
console . log ( 'IE8 Mode !\n - polyfill required\n' ) ;
26
26
options . polyfill = true ;
27
27
}
28
28
29
29
////
30
30
31
- module . exports = function ( config ) {
31
+ module . exports = function ( config ) {
32
32
33
33
var files = [
34
34
'test/_helper.js' ,
35
- [ ! options . ie8 ? ' node_modules/traceur/bin/traceur.js' : '' ] ,
35
+ [ ! options . ie8 ? ( ! options [ '6to5' ] ? ' node_modules/traceur/bin/traceur.js' : 'node_modules/6to5/browser.js' ) : '' ] ,
36
36
37
- 'dist/es6-module-loader' +
38
- ( options . polyfill ? '' : '-sans-promises' )
39
- + '.src.js' ,
37
+ 'dist/es6-module-loader-' + ( ! options [ '6to5' ] ? 'traceur' : '6to5' ) + ( options . polyfill ? '' : '-sp' ) + '.src.js' ,
40
38
41
39
'test/_browser.js' ,
42
40
'test/browser-script-type-module.js' ,
@@ -151,7 +149,7 @@ module.exports = function (config) {
151
149
} ;
152
150
153
151
function flatten ( arr ) {
154
- return arr . reduce ( function ( memo , val ) {
152
+ return arr . reduce ( function ( memo , val ) {
155
153
return memo . concat ( util . isArray ( val ) ? flatten ( val ) : val ? [ val ] : [ ] ) ;
156
154
} , [ ] ) ;
157
155
}
Original file line number Diff line number Diff line change
1
+ require ( '../dist/es6-module-loader-6to5.src' ) ;
2
+
3
+ module . exports = {
4
+ Loader : global . LoaderPolyfill ,
5
+ System : global . System
6
+ } ;
Original file line number Diff line number Diff line change
1
+ require ( '../dist/es6-module-loader-traceur.src' ) ;
2
+
3
+ module . exports = {
4
+ Loader : global . LoaderPolyfill ,
5
+ System : global . System
6
+ } ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 54
54
},
55
55
"main" : " lib/index-traceur" ,
56
56
"scripts" : {
57
- "test" : " npm run test:node && npm run test:browsers " ,
58
- "test:node" : " mocha test/_node.js" ,
59
- "test:browsers " : " karma start --single-run" ,
57
+ "test" : " npm run test:node && npm run test:browser " ,
58
+ "test:node" : " mocha test/_node-traceur.js && mocha test/_node-6to5 .js" ,
59
+ "test:browser " : " karma start --single-run && karma start --single-run --6to5 " ,
60
60
"test:browsers:perf" : " karma start karma-benchmark.conf.js --single-run"
61
61
},
62
62
"dependencies" : {
Original file line number Diff line number Diff line change 17
17
throw new TypeError ( 'Include 6to5 for module syntax support' ) ;
18
18
}
19
19
20
- var options = this . parseOptions || { } ;
20
+ var options = this . to5Options || { } ;
21
21
options . modules = 'system' ;
22
22
options . sourceMap = 'inline' ;
23
23
options . filename = load . address ;
24
24
options . code = true ;
25
25
options . ast = false ;
26
- options . runtime = true ;
27
26
28
27
var source = to5 . transform ( load . source , options ) . code ;
29
28
32
31
33
32
// add "!eval" to end of 6to5 sourceURL
34
33
// I believe this does something?
35
- source = 'var __moduleAddress = "' + load . address + '";' + source + '!eval' ;
34
+ source = 'var __moduleAddress = "' + load . address + '";' + source + '\n//# sourceURL=' + load . address + ' !eval';
36
35
37
36
__eval ( source , __global , load ) ;
38
37
}
Original file line number Diff line number Diff line change @@ -899,7 +899,6 @@ function logloads(loads) {
899
899
} ) ;
900
900
901
901
// 26.3.3.13 realm not implemented
902
- this . parseOptions = { } ;
903
902
}
904
903
905
904
function Module ( ) { }
Original file line number Diff line number Diff line change 28
28
29
29
console . assert ( load . source , 'Non-empty source' ) ;
30
30
31
- var options = this . parseOptions || { } ;
31
+ var options = this . traceurOptions || { } ;
32
32
options . modules = 'instantiate' ;
33
33
options . script = false ;
34
34
options . sourceMaps = 'inline' ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ global.expect = require('expect.js');
4
4
5
5
require ( './_helper' ) ;
6
6
7
- require ( '../lib' ) ;
7
+ require ( '../lib/index-6to5 ' ) ;
8
8
9
9
require ( './system.spec' ) ;
10
10
You can’t perform that action at this time.
0 commit comments