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

Commit 635126e

Browse files
committed
update to Traceur 0.0.66
1 parent 857a8d4 commit 635126e

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

Gruntfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ module.exports = function (grunt) {
9191
grunt.loadNpmTasks('grunt-string-replace');
9292

9393
grunt.registerTask('lint', ['jshint']);
94+
grunt.registerTask('compile', ['esnext', 'string-replace', 'concat']);
9495
grunt.registerTask('default', [/*'jshint', */'esnext', 'string-replace',
9596
'concat', 'uglify']);
9697
};

src/loader.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,22 +1047,14 @@ function logloads(loads) {
10471047

10481048
load.isDeclarative = true;
10491049

1050-
var compiler = new traceur.Compiler();
1051-
var options = System.traceurOptions || {};
1050+
var options = traceur.options || {};
10521051
options.modules = 'instantiate';
10531052
options.sourceMaps = true;
10541053
options.filename = load.address;
1055-
var output = compiler.stringToTree({content: load.source, options: options});
1056-
checkForErrors(output);
10571054

1058-
output = compiler.treeToTree(output);
1059-
checkForErrors(output);
1060-
1061-
output = compiler.treeToString(output);
1062-
checkForErrors(output);
1063-
1064-
var source = output.js;
1065-
var sourceMap = output.generatedSourceMap;
1055+
var compiler = new traceur.Compiler(options);
1056+
var source = compiler.compile(load.source, options.filename);
1057+
var sourceMap = compiler.getSourceMap();
10661058

10671059
if (__global.btoa && sourceMap)
10681060
source += '\n//# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(sourceMap))) + '\n';

test/syntax/import.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import d from './export';
44

55
import { s as p } from './reexport1';
66

7-
import r from './reexport2';
8-
97
import { z, q as r } from './reexport2';
108

119
import * as q from './reexport1';

test/syntax/reexport-binding.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
import { p } from './rebinding';
2-
p = 3;
1+
import { p } from './rebinding';

0 commit comments

Comments
 (0)