https://github.com/davidmyersdev/makke
A module bundler and REPL for your Node CLI tools with full TypeScript support
https://github.com/davidmyersdev/makke
Last synced: about 2 months ago
JSON representation
A module bundler and REPL for your Node CLI tools with full TypeScript support
- Host: GitHub
- URL: https://github.com/davidmyersdev/makke
- Owner: davidmyersdev
- License: mit
- Created: 2022-07-19T16:44:16.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-19T21:59:53.000Z (almost 4 years ago)
- Last Synced: 2024-10-29T23:49:58.897Z (over 1 year ago)
- Language: TypeScript
- Size: 30 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# makke
A module bundler and REPL for your Node CLI tools with full TypeScript support

## Getting Started
With your preferred package manager, add `makke` as a dev dependency.
```sh
# npm
npm i makke -D
# pnpm
pnpm i makke -D
# yarn
yarn add makke -D
```
### Add your config file
Create a file called `makke.config.ts` in your project root.
```ts
import { defineConfig } from 'makke'
import { dependencies } from './package.json' assert { type: 'json' }
export default defineConfig({
// Alias your commands to make them easier to run.
aliases: [
'makke',
],
esbuild: {
entryPoints: ['./src/index.ts'],
external: Object.keys(dependencies),
outfile: './dist/bundle.js',
tsconfig: './tsconfig.json',
},
})
```
### Add scripts to your `package.json` file
Add the following scripts to your `package.json` file.
```json
{
"scripts": {
"dev": "makke dev",
"build": "makke build"
}
}
```
### Ignore the `.makke` folder
Make sure you add `.makke` to your `.gitignore`. This folder is used to cache files in development.
### Launch the REPL and start developing
Running `makke dev` starts a [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) for you to run your custom commands. When your source files change, `makke` instantly rebuilds your project with the speed of `esbuild`.
### Build for production
When you are happy with the results of your project, run `makke build` to creation a production build.