chore(ts2dart): remove hand-written ts2dart typings

Now that we are on TS 1.6, we can use the new node module resolution strategy.

Closes #4372
This commit is contained in:
Alex Eagle 2015-09-25 14:32:45 -07:00 committed by Alex Eagle
parent 589ce31dfc
commit 3dd9919bbd
5 changed files with 8 additions and 27 deletions

View File

@ -10026,7 +10026,7 @@
}
},
"ts2dart": {
"version": "0.7.5",
"version": "0.7.7",
"dependencies": {
"source-map": {
"version": "0.4.4",

6
npm-shrinkwrap.json generated
View File

@ -15496,9 +15496,9 @@
}
},
"ts2dart": {
"version": "0.7.5",
"from": "ts2dart@0.7.5",
"resolved": "https://registry.npmjs.org/ts2dart/-/ts2dart-0.7.5.tgz",
"version": "0.7.7",
"from": "ts2dart@0.7.7",
"resolved": "https://registry.npmjs.org/ts2dart/-/ts2dart-0.7.7.tgz",
"dependencies": {
"source-map": {
"version": "0.4.4",

View File

@ -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",

View File

@ -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');
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);
}

View File

@ -1,18 +0,0 @@
// TODO(martinprobst): This is a hand-written declarations file. Replace with an automatically
// generated one when TypeScript has a strategy to distribute TS source via npm.
declare module "ts2dart" {
export interface TranspilerOptions {
failFast?: boolean;
generateLibraryName?: boolean;
generateSourceMap?: boolean;
basePath?: string;
translateBuiltins?: boolean;
}
export class Transpiler {
constructor(options: TranspilerOptions);
transpile(fileNames: string[], outdir?: string);
}
}