2.1.0 • Published 10 months ago

@codewithkyle/twist v2.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Twist

A simple build tool for wrangling your ES Module static import paths.

Install

npm i -S @codewithkyle/twist

Usage

By default we will look for JavaScript/TypeScript files in the src/ directory and will output to the public/js directory. If you do not provide a --config flag we will use the default options based on the transpiler you've selected.

You can also provide the --path flag if you need to remap your imports to a CDN/external URL.

twist --src=./path-to/source --out=./public/js --type=esbuild --config=./esbuild.config.js --path='https://cdn.example.com/'

If you are using dynamic imports you can add the --dynamic flag.

Build Types

  • none the source code (JavaScript) will only be scrubbed & relocated.
  • tsc the source code will be transpiled using the typescript package before being scrubbed and relocated.
  • esbuild the source code will be transpiled using the esbuild package before being scrubbed and relocated.
  • babel the source code will be transpired using the @babel/core pacakge before being scrubbed and relocated.

Note: this library uses peer dependencies. You must install typescript, esbuild, or @babel/core to transpile the source code.

2.1.0

10 months ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.5.1

2 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago