Skip to content
This repository has been archived by the owner on Jun 27, 2018. It is now read-only.

Commit

Permalink
Merge pull request #3 from teppeis/fix-build
Browse files Browse the repository at this point in the history
Fix build and index.d.ts
  • Loading branch information
teppeis committed Jan 23, 2015
2 parents 001fb46 + 0fe1a80 commit 88b8fd5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ node_js:
- "0.10"
- "0.11"
sudo: false
before_script:
- npm run dts
- npm run build
10 changes: 10 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
/// <reference path="typings/node/node.d.ts" />
/// <reference path="node_modules/typescript/bin/typescript.d.ts" />
import ts = require('typescript');
declare function tss(code: string, options: ts.CompilerOptions): string;
declare module tss {
class TypeScriptSimple {
private service;
private outputs;
private options;
private files;
/**
* @param {ts.CompilerOptions=} options TypeScript compile options (some options are ignored)
*/
Expand All @@ -12,6 +17,11 @@ declare module tss {
* @return {string}
*/
compile(code: string): string;
private createService();
private getTypeScriptBinDir();
private getDefaultLibFilename(options);
private toJavaScript(service);
private formatDiagnostics(diagnostics);
}
}
export = tss;
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "typescript-simple",
"version": "0.1.2",
"version": "0.2.0",
"description": "Just compile TypeScript code string to JS. That's all!",
"main": "index.js",
"scripts": {
"test": "mocha",
"build": "tsc --target ES5 --module commonjs --noImplicitAny index.ts"
"test": "npm run build && mocha",
"build": "tsc -d --target ES5 --module commonjs --noImplicitAny index.ts"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 88b8fd5

Please sign in to comment.