Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beerush-id/esdev
ES Module & CommonJS Helper
https://github.com/beerush-id/esdev
Last synced: about 2 months ago
JSON representation
ES Module & CommonJS Helper
- Host: GitHub
- URL: https://github.com/beerush-id/esdev
- Owner: beerush-id
- Created: 2023-07-23T00:44:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-09T21:34:05.000Z (about 1 year ago)
- Last Synced: 2024-05-30T01:42:10.477Z (8 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# `@beerush/esdev`
A simple typescript helper to run you package development that will output ESM and CJS modules.
This package is simply run a `tsc` command with the `tsconfig.json` and `tsconfig-cjs.json` configs, and then rename
any `.js` file under `dist/cjs` folder to `.cjs` extension, and rename any **`imports`**/**`require`** endings
with `.js` to `.cjs`.## Usage
```bash
npx @beerush/esdev
```## Options
- **`--watch`** - Watch for changes and recompile.
- **`--clean`** - Clean the output directory before compiling.## Requirements
- **`tsconfig.json`** file as the ESM config.
- **`tsconfig-cjs.json`** file as the CJS config.## Install as Dev Script
```bash
npm i -D @beerush/esdev
``````json
{
"scripts": {
"dev": "esdev"
}
}
``````bash
npm run dev
```