Socket
Book a DemoInstallSign in
Socket

milkee

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

milkee

A simple CoffeeScript build tool with coffee.config.cjs

latest
Source
npmnpm
Version
2.3.0
Version published
Maintainers
1
Created
Source

Milkee

Milkee logo

A simple CoffeeScript build tool with coffee.config.cjs

How to get started

Install

Install Milkee:

# global installation
npm i -g milkee

# or local installation
npm i -D milkee

CoffeeScript & @babel/core are required.

[!TIP] @babel/core is required if options.transpile is true .

# global installation
npm i -g coffeescript @babel/core

# or local installation
npm i -D coffeescript @babel/core

Setup

Run -s (--setup) command, generate coffee.config.cjs!

# global
milkee -s

# or local
npx milkee -s

coffee.config.cjs

/** @type {import('@milkee/d').Config} */

module.exports = {
  // The entry point for compilation.
  // This can be a single file or a directory (e.g., 'src/' or 'src/app.coffee').
  entry: 'src',
  // The output for the compiled JavaScript files.
  // If 'options.join' is true, this should be a single file path (e.g., 'dist/app.js').
  // If 'options.join' is false, this should be a directory (e.g., 'dist').
  output: 'dist',
  // (Optional) Additional options for the CoffeeScript compiler.
  // See `coffee --help` for all available options.
  // Web: https://coffeescript.org/annotated-source/command.html
  options: {
    // The following options are supported:
    // bare: false,
    // join: false,
    // map: false,
    // inlineMap: false,
    // noHeader: false,
    // transpile: false,
    // literate: false,
    // watch: false,
  },
  // (Optional) Additional options/plugins for the Milkee builder.
  milkee: {
    options: {
      // Before compiling, reset the directory.
      // refresh: false,
      // Before compiling, prompt "Do you want to Continue?".
      // confirm: false,
      // After compiling, copy non-coffee files from entry to output directory. (Only works when options.join is false)
      // copy: false,
    },
    plugins: []
  },
};
options (CoffeeScript Compiler Options)

These options are passed directly to the coffee compiler.

OptionTypeDefaultDescription
barebooleanfalsecompile without a top-level function wrapper
joinbooleanfalseconcatenate the source CoffeeScript before compiling
mapbooleanfalsegenerate source map and save as .js.map files
inlineMapbooleanfalsegenerate source map and include it directly in output
noHeaderbooleanfalsesuppress the "Generated by" header
transpilebooleanfalsepipe generated JavaScript through Babel
literatebooleanfalsetreat stdio as literate style coffeescript
watchbooleanfalsewatch scripts for changes and rerun commands

CoffeeScript - command.coffee

milkee.options (Milkee Specific Options)

These options control Milkee's behavior.

OptionTypeDefaultDescription
refreshbooleanfalseBefore compiling, reset the output directory.
confirmbooleanfalseBefore compiling, prompt "Do you want to Continue?".
copybooleanfalseAfter 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: [
      // This call returns the PluginExecutor
      myPlugin({ option: 'value' }),
      // ...
    ]
  }
}

Compile

Milkee will automatically read coffee.config.cjs, assemble the command from your options, and start compilation!

# global
milkee

# or local
npx milkee

Keywords

coffee

FAQs

Package last updated on 07 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts