2.0.1 • Published 2 years ago

esmon v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

💛 You can help the author become a full-time open-source maintainer by sponsoring him on GitHub.


esmon

npm version

Install

npm i -D esmon

Usage

Run a script and watch for changes: (for development)

esmon your-script.ts

This will also watch all the files imported by your-script.ts and re-run it on changes.

Note that this command will emit temporary files to ./temp folder, it's recommended to add it to your .gitignore file.

If you intend to run the file without watching files, you can use the run command instead: esmon run your-script.ts.

Build a script: (for production)

esmon build your-scripts.ts

This command will emit bundled script in esm format to ./dist folder with a filename matching the original filename. i.e. here you will get ./dist/your-script.cjs.

ESM

You can also output ESM format with flag --esm, the output extension will be .mjs. __dirname and __filename will also be shimmed.

Externals

dependencies, devDependencies and peerDependencies are automatically excluded from the bundled scripts. If you wish to bundle devDependencies, you can pass the --bundleDevDeps flag.

Decorators

Both experimentalDecorators and emitDecoratorMetadata options in tsconfig.json are supported, when you have emitDecoratorMetadata enabled we will use swc to transform decorators.

License

MIT © EGOIST

1.4.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.0

3 years ago