Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@cypress/coffeeify
Advanced tools
browserify plugin for coffee-script with support for mixed .js and .coffee files
CoffeeScript browserify transform. 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 ** n
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
3125
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
3125
You can also pass options to the CoffeeScript compiler:
$ browserify -t [ coffeeify --bare false --header true ] --extension=".coffee" foo.coffee
..
// Generated by CoffeeScript 1.10.0
(function() {
console.log(require('./bar.js'));
}).call(this);
..
Name | Default | Description |
---|---|---|
sourceMap | null | Generate source maps, deteremined from browserify's --debug option if not set. |
bare | true | Omit the (function(){ .. }).call(this); wrapper. |
header | false | Include the // Generated by CoffeeScript <version> header in every file processed. |
When using browserify programatically options can be passed as an object, example:
browserify = require 'browserify'
coffeeify = require 'coffeeify'
bundle = browserify
extensions: ['.coffee']
bundle.transform coffeeify,
bare: false
header: true
bundle.add 'foo.coffee'
bundle.bundle (error, result) ->
throw error if error?
process.stdout.write result
With npm do:
npm install coffeeify
MIT
FAQs
browserify plugin for coffee-script with support for mixed .js and .coffee files
The npm package @cypress/coffeeify receives a total of 3 weekly downloads. As such, @cypress/coffeeify popularity was classified as not popular.
We found that @cypress/coffeeify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.