Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
browserify v2 plugin for coffee-script with support for mixed .js and .coffee files
The coffeeify npm package is a Browserify transform for CoffeeScript. It allows you to require CoffeeScript files in your Browserify bundle, enabling seamless integration of CoffeeScript into your JavaScript projects.
Transform CoffeeScript to JavaScript
This feature allows you to transform CoffeeScript files into JavaScript using Browserify. The code sample demonstrates how to bundle a CoffeeScript file (`main.coffee`) into a JavaScript file (`bundle.js`) using the coffeeify transform.
const browserify = require('browserify');
const fs = require('fs');
browserify({
entries: ['main.coffee'],
transform: ['coffeeify']
})
.bundle()
.pipe(fs.createWriteStream('bundle.js'));
Integration with Browserify
This feature shows how to integrate coffeeify with Browserify directly. The code sample demonstrates how to bundle a CoffeeScript file (`app.coffee`) into a JavaScript file (`app.bundle.js`) by specifying the `.coffee` extension and using the coffeeify transform.
const browserify = require('browserify');
const coffeeify = require('coffeeify');
const fs = require('fs');
browserify({
entries: ['app.coffee'],
extensions: ['.coffee']
})
.transform(coffeeify)
.bundle()
.pipe(fs.createWriteStream('app.bundle.js'));
The `coffeescript` package is the official CoffeeScript compiler. It can be used to compile CoffeeScript files into JavaScript. Unlike coffeeify, which is a Browserify transform, `coffeescript` is a standalone compiler that can be used in various build processes.
The `gulp-coffee` package is a Gulp plugin for compiling CoffeeScript files. It integrates with the Gulp build system, allowing you to include CoffeeScript compilation in your Gulp tasks. This is different from coffeeify, which is specifically designed for use with Browserify.
The `grunt-contrib-coffee` package is a Grunt plugin for compiling CoffeeScript files. It integrates with the Grunt build system, enabling you to add CoffeeScript compilation to your Grunt tasks. This package is similar to gulp-coffee but is designed for use with Grunt instead of Gulp.
browserify v2 plugin for coffee-script
mix and match .coffee
and .js
files in the same project
given some files written in a mix of js
and coffee
:
foo.coffee:
console.log(require './bar.js')
bar.js:
module.exports = require('./baz.coffee')(5)
baz.coffee:
module.exports = (n) -> n * 111
install coffeeify into your app:
$ npm install coffeeify
when you compile your app, just pass -t coffeeify
to browserify:
$ browserify -t coffeeify foo.coffee > bundle.js
$ node bundle.js
555
you can omit the .coffee
extension from your requires if you add the extension to browserify's module extensions:
module.exports = require('./baz')(5)
$ browserify -t coffeeify --extension=coffee foo.coffee > bundle.js
$ node bundle.js
555
With npm do:
npm install coffeeify
MIT
FAQs
browserify plugin for coffeescript with support for mixed .js and .coffee files
The npm package coffeeify receives a total of 284,675 weekly downloads. As such, coffeeify popularity was classified as popular.
We found that coffeeify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.