Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-coffeescript

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-coffeescript

Bundle CoffeeScript with Esbuild

  • 2.2.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

esbuild-coffeescript

esbuild-coffeescript

This plugin lets you import CoffeeScript files when bundling with Esbuild

Installation

$ npm install --save-dev esbuild-coffeescript

Getting Started

main.coffee

answer = 42
console.log("the answer is #{answer}")

build.js

const coffeeScriptPlugin = require('esbuild-coffeescript');

require('esbuild').build({
  entryPoints: ['main.coffee'],
  bundle: true,
  outfile: 'out.js',
  plugins: [coffeeScriptPlugin()],
});

Configuration

An object containing configuration options may be passed into the plugin constructor coffeeScriptPlugin

coffeeScriptPlugin({
  bare: true,
});

The following options are available:

  • options.inlineMap, boolean: if true, output the source map as a base64-encoded string in a comment at the bottom.
  • options.filename, string: the filename to use for the source map. It can include a path (relative or absolute).
  • options.bare, boolean: if true, output without the top-level function safety wrapper.
  • options.header, boolean: if true, output the Generated by CoffeeScript header.
  • options.transpile, object: if set, this must be an object with the options to pass to Babel. See Transpilation.
  • options.ast, boolean: if true, return an abstract syntax tree of the input CoffeeScript source code.

But CoffeeScript is dead?

While it might seem like it, coffeescript is still downloaded over 1.6 million times every week. Coffeescript is still actively used and widespread, and this plugin provides a great way for these projects to leverage the great esbuild tooling.

Keywords

FAQs

Package last updated on 12 Feb 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc