2.0.0 • Published 5 years ago

think-typescript v2.0.0

Weekly downloads
6
License
ISC
Repository
github
Last release
5 years ago

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

5 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago