Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Jul 14, 2017
Feb 20, 2017
Feb 20, 2017
Feb 20, 2017
Feb 13, 2017
Jul 14, 2017

README.md

think-typescript

think-typescript

Build Status Coverage Status npm

think-typescript compile typescript file

Syntax

import thinkTypescript from 'think-typescript';
thinkTypescript({
  srcPath,
  outPath,
  file,
  typescriptOptions,
  ext,
});
  • srcPath {String} the file source path.
  • outPath {String} the directory for output file.
  • file {String} the file path in the 'srcPath'.
  • [typescriptOptions] {Object} the typescript options,default {fileName: file, reportDiagnostics: true, compilerOptions: {module: 'commonjs', target: 'es5', sourceMap: true}}.
  • [ext] {String} the new file extension,default .js.

Usage

Compile typescript file:

import thinkTypescript from 'think-typescript';

thinkTypescript({
  srcPath: './test/src/a',
  outPath: './test/out',
  file: 'b/test.ts'
});
You can’t perform that action at this time.