Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion npm-shrinkwrap.clean.json
Original file line number Diff line number Diff line change
Expand Up @@ -10026,7 +10026,7 @@
}
},
"ts2dart": {
"version": "0.7.5",
"version": "0.7.7",
"dependencies": {
"source-map": {
"version": "0.4.4",
Expand Down
6 changes: 3 additions & 3 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"temp": "^0.8.1",
"ternary-stream": "^1.2.3",
"through2": "^0.6.1",
"ts2dart": "^0.7.5",
"ts2dart": "^0.7.7",
"tsd": "^0.6.5-beta",
"tslint": "^2.5.0",
"typescript": "^1.6.2",
Expand Down
7 changes: 3 additions & 4 deletions tools/broccoli/broccoli-ts2dart.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
/// <reference path="../typings/node/node.d.ts" />
/// <reference path="../typings/fs-extra/fs-extra.d.ts" />
/// <reference path="./ts2dart.d.ts" />

import fs = require('fs');
import fse = require('fs-extra');
import path = require('path');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OOC, is anything preventing us from using ES6 syntax for all imports here (not saying to do it in this PR)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends on whether the other typings declare the "fs", "fs-extra", "path" modules. I think they do (the node.d.ts was updated to support ES6 output a while ago) so I think we could do this.

import ts2dart = require('ts2dart');
import * as ts2dart from 'ts2dart';
import {wrapDiffingPlugin, DiffingBroccoliPlugin, DiffResult} from './diffing-broccoli-plugin';

class TSToDartTranspiler implements DiffingBroccoliPlugin {
static includeExtensions = ['.ts'];

private basePath: string;
private transpiler: ts2dart.Transpiler;

constructor(public inputPath: string, public cachePath: string, public options) {
constructor(public inputPath: string, public cachePath: string,
public options: ts2dart.TranspilerOptions) {
options.basePath = inputPath;
this.transpiler = new ts2dart.Transpiler(options);
}
Expand Down
18 changes: 0 additions & 18 deletions tools/broccoli/ts2dart.d.ts

This file was deleted.