Milkee

English | 日本語

A simple CoffeeScript build tool with coffee.config.cjs
Official site: https://milkee.org
How to get started
Install
Install Milkee:
npm i -g milkee
npm i -D milkee
CoffeeScript & @babel/core are required.
[!TIP]
@babel/core is required if options.transpile is true .
npm i -g coffeescript @babel/core
npm i -D coffeescript @babel/core
Setup
Run -s (--setup) command, generate coffee.config.cjs!
milkee -s
npx milkee -s
coffee.config.cjs
module.exports = {
entry: 'src',
output: 'dist',
options: {
},
milkee: {
options: {
},
plugins: []
},
};
options (CoffeeScript Compiler Options)
These options are passed directly to the coffee compiler.
bare | boolean | false | compile without a top-level function wrapper |
join | boolean | false | concatenate the source CoffeeScript before compiling |
map | boolean | false | generate source map and save as .js.map files |
inlineMap | boolean | false | generate source map and include it directly in output |
noHeader | boolean | false | suppress the "Generated by" header |
transpile | boolean | false | pipe generated JavaScript through Babel |
literate | boolean | false | treat stdio as literate style coffeescript |
watch | boolean | false | watch scripts for changes and rerun commands |
CoffeeScript - command.coffee
milkee.options (Milkee Specific Options)
These options control Milkee's behavior.
ignoreUpdate | boolean | false | Ignore update notifications. |
refresh | boolean | false | Before compiling, reset the output directory. |
confirm | boolean | false | Before compiling, prompt "Do you want to Continue?". |
copy | boolean | false | After compiling, copy non-coffee files from entry to output directory. (Only works when options.join is false) |
milkee.plugins (Milkee Specific Plugins)
You can extend Milkee's functionality by using plugins. Plugins are simple functions that run after each successful compilation, giving you access to the compiled files and configuration.
Example:
const myPlugin = require('./plugins/my-plugin.js');
module.exports = {
milkee: {
plugins: [
myPlugin({ option: 'value' }),
]
}
}
Compile
Milkee will automatically read coffee.config.cjs, assemble the command from your options, and start compilation!
milkee
npx milkee
Creating a Plugin
Want to create your own Milkee plugin? Check out the plugin documentation:
Donate

