Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
grunt-contrib-coffee
Advanced tools
Compile CoffeeScript files to JavaScript
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-contrib-coffee --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-contrib-coffee');
This plugin was designed to work with Grunt >= 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that you upgrade, but in case you can't please use v0.3.2.
Run this task with the grunt coffee
command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Type: String
Default: linefeed
Concatenated files will be joined on this string.
Type: Boolean
Compile the JavaScript without the top-level function safety wrapper.
Type: Boolean
Default: false
When compiling multiple .coffee files into a single .js file, concatenate first.
Type: Boolean
Default: false
Compile JavaScript and create a .map file linking it to the CoffeeScript source. When compiling multiple .coffee files to a single .js file, concatenation occurs as though the 'join' option is enabled
Type: String
Default: (same path as your compiled js files)
Generated source map files will be created here.
Type: String
Default: '.src.coffee'
Resulting extension when joining multiple CoffeeScript files.
coffee: {
compile: {
files: {
'path/to/result.js': 'path/to/source.coffee', // 1:1 compile
'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] // compile and concat into single file
}
},
compileBare: {
options: {
bare: true
},
files: {
'path/to/result.js': 'path/to/source.coffee', // 1:1 compile
'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] // compile and concat into single file
}
},
compileJoined: {
options: {
join: true
},
files: {
'path/to/result.js': 'path/to/source.coffee', // 1:1 compile, identical output to join = false
'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] // concat then compile into single file
}
},
compileWithMaps: {
options: {
sourceMap: true
},
files: {
'path/to/result.js': 'path/to/source.coffee', // 1:1 compile
'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] // concat then compile into single file
}
},
compileWithMapsDir: {
options: {
sourceMap: true,
sourceMapDir: 'path/to/maps/' // source map files will be created here
},
files: {
'path/to/result.js': 'path/to/source.coffee'
}
},
glob_to_multiple: {
expand: true,
flatten: true,
cwd: 'path/to',
src: ['*.coffee'],
dest: 'path/to/dest/',
ext: '.js'
}
}
For more examples on how to use the expand
API to manipulate the default dynamic path construction in the glob_to_multiple
examples, see "Building the files object dynamically" in the grunt wiki entry Configuring Tasks.
options.sourceMapDir
when creating sourceRoot
. Logs information if no valid files were matched.grunt.verbose
. Updates chalk to 0.5.sourceMappingURL
calculated correctly.grunt.util._
.sourceMappingUrl
syntax.sourceMapDir
.join
option.this.filesSrc
API.Task submitted by Eric Woroshow
This file was generated on Mon Mar 18 2019 14:04:56.
FAQs
Compile CoffeeScript files to JavaScript
The npm package grunt-contrib-coffee receives a total of 27,961 weekly downloads. As such, grunt-contrib-coffee popularity was classified as popular.
We found that grunt-contrib-coffee demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.