npm.io
1.30.0 • Published 1 year agoCLI

@s-ui/js-compiler

Licence
MIT
Version
1.30.0
Deps
7
Size
5 kB
Vulns
0
Weekly
0

@s-ui/js-compiler

Compile your JavaScript and JSX files to be compatible with the browsers

It provides:

  • Unified code transformation.
  • Usage of SWC to compile files faster.

Installation

$ npm install @s-ui/js-compiler --save-dev

Usage

"scripts": {
  "prepublishOnly": "sui-js-compiler"
}
Via CLI
$ ./node_modules/.bin/sui-js-compiler
Options
Option Type Default Description
--ignore string | glob - Takes all the pattern comma separated and ignore them during compilation.
--modern boolean - Transpile using modern browser targets.
$ ./node_modules/.bin/sui-js-compiler --ignore=./src/**/*.test.js
$ ./node_modules/.bin/sui-js-compiler --modern
Compiling TypeScript files and generating type declarations

This tools lets you compile TS files and generate their type declarations in your packages out of the box. It will do it if the package itself has a tsconfig.json placed in its root folder.

Requirements

Automatically, @s-ui/js-compiler searches for /src folder and outputs the compiled files to /lib.

Contributing

Please refer to the main repo contributing info.