This package has been deprecated

Author message:

tsn has been deprecated in favour of @gitzone/tsbuild - please upgrade asap!!!

tsn
TypeScript icon, indicating that this package has built-in type declarations

2.0.15 • Public • Published

tsn

Availabililty

npm git git docs

Status for master

build status coverage report Dependency Status bitHound Dependencies bitHound Code 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

Readme

Keywords

Package Sidebar

Install

npm i tsn

Weekly Downloads

30

Version

2.0.15

License

MIT

Last publish

Collaborators

  • deleteme-01
  • lossless
  • philkunz