fix: correct library not to have lib and dart in name.
This commit is contained in:
parent
eb8336816a
commit
87dd88ff0c
|
@ -28,8 +28,11 @@ export class Compiler extends TraceurCompiler {
|
||||||
var writer = new DartTreeWriter();
|
var writer = new DartTreeWriter();
|
||||||
writer.visitAny(tree);
|
writer.visitAny(tree);
|
||||||
// TODO: Do this in the writer...
|
// TODO: Do this in the writer...
|
||||||
var library = 'library '+this.resolveModuleName(filename).replace(/\//g, '.')+';\n';
|
var library = this.resolveModuleName(filename)
|
||||||
return library + writer.toString();
|
.replace(/\//g, '.')
|
||||||
|
.replace('.lib.', '.')
|
||||||
|
.replace(/\.dart$/, '');
|
||||||
|
return 'library ' + library + ';\n' + writer.toString();
|
||||||
}
|
}
|
||||||
// Copy of the original method to use our custom Parser
|
// Copy of the original method to use our custom Parser
|
||||||
parse(content, sourceName) {
|
parse(content, sourceName) {
|
||||||
|
|
Loading…
Reference in New Issue