Go to file
2024-06-24 12:06:19 +02:00
.vscode fix(core): update 2022-03-18 14:32:35 +01:00
test fix(core): update 2023-08-26 13:30:06 +02:00
ts fix(core): Minor improvements and optimizations in core TypeScript compiler integration. 2024-06-24 12:06:18 +02:00
.gitignore fix(core): update 2020-03-13 19:23:01 +00:00
.gitlab-ci.yml fix(core): update 2023-06-03 16:45:40 +02:00
changelog.md fix(core): Minor improvements and optimizations in core TypeScript compiler integration. 2024-06-24 12:06:18 +02:00
cli.child.ts fix(core): update 2022-03-12 21:09:33 +01:00
cli.js fix(core): update 2022-03-12 19:32:15 +01:00
cli.ts.js fix(core): update 2023-08-26 15:34:42 +02:00
npmextra.json fix(core): update 2022-03-18 14:32:35 +01:00
package.json 2.1.82 2024-06-24 12:06:19 +02:00
pnpm-lock.yaml fix(dependencies): Update dependencies to latest versions 2024-06-24 12:00:37 +02:00
readme.hints.md fix(dependencies): Update dependencies to latest versions 2024-06-24 12:00:37 +02:00
readme.md fix(core): update 2023-06-03 16:45:40 +02:00
tsconfig.json fix(core): update 2023-08-26 13:27:51 +02:00

@gitzone/tsbuild

TypeScript nightly to easily make use of latest features

Status for master

Status Category Status Badge
GitLab Pipelines pipeline status
GitLab Pipline Test Coverage coverage report
npm npm downloads per month
Snyk Known Vulnerabilities
TypeScript Support TypeScript
node Support node
Code Style Code Style
PackagePhobia (total standalone install weight) PackagePhobia
PackagePhobia (package size on registry) PackagePhobia
BundlePhobia (total size when bundled) BundlePhobia

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

Contribution

We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can contribute one time or contribute monthly. :)

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

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