@platform/ts
TypeScript icon, indicating that this package has built-in type declarations

4.7.7 • Public • Published

Module License: MIT NPM

ts

TypesScript build, prepare and publish toolchain.

Provides:

  • Command line for building, linting, preparing for publish and ultimately publishing.
  • Produces CommonJS and modern ESM transpiled builds.
  • Publishes to NPM from the distribution older, removing unnecesary pathing into the module from consumers (eg. '@my-modules/lib/...` is avoided).

Commands

Adds the ts command to your module's bin. You can optionally use the following scripts in you package.json:

{
  "scripts: {
    "test": "ts test",
    "tdd": "ts test --watch",
    "lint": "ts lint",
    "build": "ts build",
    "prepare": "ts prepare",
  }
}

To build without ESM module compilation:

{
  "scripts: {
    "build": "ts build --no-esm",
  }
}

ESModules

When setting the main of package.json make sure to not include the .js file extensions allowing environments that as using ESModule's to infer the .msj version.

{
  "name": "my-module",
  "main": "index",
  "types": "index.d.ts"
}

References:

Dependencies (5)

Dev Dependencies (1)

Package Sidebar

Install

npm i @platform/ts

Weekly Downloads

12

Version

4.7.7

License

MIT

Unpacked Size

51.2 kB

Total Files

43

Last publish

Collaborators

  • philcockfield