Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Commit d163fb8

Browse files
author
Stanislav Panferov
committed
chore(*): update typescript; compile with proper babel preset
1 parent 5552e07 commit d163fb8

File tree

5 files changed

+41
-5
lines changed

5 files changed

+41
-5
lines changed

Gruntfile.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ module.exports = function(grunt) {
2121
module: "commonjs",
2222
fast: 'never',
2323
preserveConstEnums: true,
24-
target: 'es6'
24+
moduleResolution: "node",
25+
target: 'es6',
26+
experimentalAsyncFunctions: true
2527
},
2628
src: 'src/**/*.ts',
2729
watch: 'src/',

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"grunt": "grunt",
88
"prepublish": "grunt",
9-
"babel": "babel dist --presets es2015-node4 --out-dir dist.babel --watch"
9+
"babel": "babel dist --presets es2015 --out-dir dist.babel --watch"
1010
},
1111
"author": "Stanislav Panferov <[email protected]> (http://panferov.me/)",
1212
"repository": {
@@ -48,6 +48,6 @@
4848
"grunt-shell": "^1.1.2",
4949
"grunt-ts": "^3.0.0",
5050
"load-grunt-tasks": "^0.6.0",
51-
"typescript": "^1.8.0-dev.20151107"
51+
"typescript": "^1.8.0-dev.20151119"
5252
}
5353
}

src/checker-runtime.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { ICompilerOptions, ICompilerInfo, IFile } from './host';
22
import * as colors from 'colors';
33

4+
require('babel-polyfill');
5+
46
export enum MessageType {
57
Init = <any>'init',
68
Compile = <any>'compile'

src/defines.d.ts

+28
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,31 @@ declare module "pinkie-promise" {
22
let promise: typeof Promise;
33
export = promise;
44
}
5+
6+
declare module 'tsconfig' {
7+
export interface CompilerOptions {
8+
[key: string]: any;
9+
}
10+
export interface TSConfig {
11+
compilerOptions?: CompilerOptions;
12+
files?: string[];
13+
exclude?: string[];
14+
filesGlob?: string[];
15+
[key: string]: any;
16+
}
17+
export interface Options {
18+
compilerOptions?: CompilerOptions;
19+
filterDefinitions?: boolean;
20+
resolvePaths?: boolean;
21+
}
22+
export function resolve(dir: string): Promise<string>;
23+
export function resolveSync(dir: string): string;
24+
export function load(dir: string, options?: Options): Promise<TSConfig>;
25+
export function loadSync(dir: string, options?: Options): TSConfig;
26+
export function readFile(filename: string, options?: Options): Promise<{}>;
27+
export function readFileSync(filename: string, options?: Options): TSConfig;
28+
export function parseFile(contents: string, filename: string, options?: Options): Promise<TSConfig>;
29+
export function parseFileSync(contents: string, filename: string, options?: Options): TSConfig;
30+
export function resolveConfig(data: TSConfig, filename: string, options?: Options): Promise<TSConfig>;
31+
export function resolveConfigSync(data: TSConfig, filename: string, options?: Options): TSConfig;
32+
}

src/tsconfig.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"version": "1.5.0-beta",
33
"compilerOptions": {
44
"target": "es6",
5-
"module": "commonjs",
65
"declaration": false,
76
"noImplicitAny": false,
87
"removeComments": true,
8+
"moduleResolution": "node",
99
"noLib": false,
1010
"preserveConstEnums": true,
1111
"suppressImplicitAnyIndexErrors": true
@@ -25,6 +25,10 @@
2525
"./host.ts",
2626
"./index.ts",
2727
"./instance.ts",
28+
"./resolver.ts",
2829
"./tsconfig-utils.ts"
29-
]
30+
],
31+
"atom": {
32+
"rewriteTsconfig": true
33+
}
3034
}

0 commit comments

Comments
 (0)