Go to file
2020-03-09 15:20:48 +00:00
test fix(core): update 2020-03-09 15:14:06 +00:00
ts fix(core): update 2020-03-09 15:20:47 +00:00
.gitignore fix(core): update 2019-08-26 16:28:03 +02:00
.gitlab-ci.yml fix(core): update 2019-08-26 16:28:03 +02:00
.snyk fix(core): update 2019-01-27 02:44:54 +01:00
cli.js fix(core): initial 2018-07-25 20:56:42 +02:00
cli.ts.js fix(core): initial 2018-07-25 20:56:42 +02:00
npmextra.json fix(core): update 2019-08-26 16:28:03 +02:00
package-lock.json 2.1.20 2020-03-09 15:20:48 +00:00
package.json 2.1.20 2020-03-09 15:20:48 +00:00
README.md fix(core): update 2019-08-26 16:28:03 +02:00
tsconfig.json fix(core): initial 2018-07-25 20:56:42 +02:00
tslint.json feat(cli options): now support --web for web compilations targeting Google Chrome 2018-12-05 23:29:01 +01:00

@gitzone/tsbuild

TypeScript nightly to easily make use of latest features

Status for master

build status coverage report npm downloads per month Known Vulnerabilities TypeScript node JavaScript Style Guide

Usage

Tsn uses the next tagged npm version of typescript

import * as tsn from 'tsn';

let myGlobStringObject = {
  './myTsFolder/**/*.ts': './myDestinationFolder/',
  './someOtherTsFolder/**/*.ts': './myOtherDestinationFolder/'
};

let tsOptions = {
  target: tsn.ScriptTarget.ES2015,
  module: tsn.ModuleKind.CommonJS
};

/*
note: since this only works in code, here are the target numbers
enum ScriptTarget {
        ES3 = 0,
        ES5 = 1,
        ES2015 = 2,
        ES2016 = 3,
        ES2017 = 4,
        ESNext = 5,
        Latest = 5,
}

and here are the module kinds
enum ModuleKind {
        None = 0,
        CommonJS = 1,
        AMD = 2,
        UMD = 3,
        System = 4,
        ES2015 = 5,
    }
*/

let myCwd = process.cwd();

tsn.compileGlobStringObject(
  myGlobStringObject, // the glob string object describing from where to compile what to where
  tsOptions, // the options for TypeScript
  myCwd // a custom cwd, optional, defaults to process.cwd()
);

npm

For further information read the linked docs at the top of this readme.

MIT licensed | © Lossless GmbH | By using this npm module you agree to our privacy policy

repo-footer