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:
parent
589ce31dfc
commit
3dd9919bbd
|
@ -10026,7 +10026,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ts2dart": {
|
"ts2dart": {
|
||||||
"version": "0.7.5",
|
"version": "0.7.7",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"source-map": {
|
"source-map": {
|
||||||
"version": "0.4.4",
|
"version": "0.4.4",
|
||||||
|
|
|
@ -15496,9 +15496,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ts2dart": {
|
"ts2dart": {
|
||||||
"version": "0.7.5",
|
"version": "0.7.7",
|
||||||
"from": "ts2dart@0.7.5",
|
"from": "ts2dart@0.7.7",
|
||||||
"resolved": "https://registry.npmjs.org/ts2dart/-/ts2dart-0.7.5.tgz",
|
"resolved": "https://registry.npmjs.org/ts2dart/-/ts2dart-0.7.7.tgz",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"source-map": {
|
"source-map": {
|
||||||
"version": "0.4.4",
|
"version": "0.4.4",
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
"temp": "^0.8.1",
|
"temp": "^0.8.1",
|
||||||
"ternary-stream": "^1.2.3",
|
"ternary-stream": "^1.2.3",
|
||||||
"through2": "^0.6.1",
|
"through2": "^0.6.1",
|
||||||
"ts2dart": "^0.7.5",
|
"ts2dart": "^0.7.7",
|
||||||
"tsd": "^0.6.5-beta",
|
"tsd": "^0.6.5-beta",
|
||||||
"tslint": "^2.5.0",
|
"tslint": "^2.5.0",
|
||||||
"typescript": "^1.6.2",
|
"typescript": "^1.6.2",
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
/// <reference path="../typings/node/node.d.ts" />
|
/// <reference path="../typings/node/node.d.ts" />
|
||||||
/// <reference path="../typings/fs-extra/fs-extra.d.ts" />
|
/// <reference path="../typings/fs-extra/fs-extra.d.ts" />
|
||||||
/// <reference path="./ts2dart.d.ts" />
|
|
||||||
|
|
||||||
import fs = require('fs');
|
import fs = require('fs');
|
||||||
import fse = require('fs-extra');
|
import fse = require('fs-extra');
|
||||||
import path = require('path');
|
import path = require('path');
|
||||||
import ts2dart = require('ts2dart');
|
import * as ts2dart from 'ts2dart';
|
||||||
import {wrapDiffingPlugin, DiffingBroccoliPlugin, DiffResult} from './diffing-broccoli-plugin';
|
import {wrapDiffingPlugin, DiffingBroccoliPlugin, DiffResult} from './diffing-broccoli-plugin';
|
||||||
|
|
||||||
class TSToDartTranspiler implements DiffingBroccoliPlugin {
|
class TSToDartTranspiler implements DiffingBroccoliPlugin {
|
||||||
static includeExtensions = ['.ts'];
|
static includeExtensions = ['.ts'];
|
||||||
|
|
||||||
private basePath: string;
|
|
||||||
private transpiler: ts2dart.Transpiler;
|
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;
|
options.basePath = inputPath;
|
||||||
this.transpiler = new ts2dart.Transpiler(options);
|
this.transpiler = new ts2dart.Transpiler(options);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue