Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
grunt-asset-smasher
Advanced tools
Readme
Grunt plugin for asset-smasher
See the asset-smasher homepage for more details on usage of asset-smasher and how it works.
This plugin requires Grunt ~0.4.1
and asset-smasher ~0.3.0
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-asset-smasher --save-dev
One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-asset-smasher');
In your project's Gruntfile, add a section named asset_smasher
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
asset_smasher: {
options: {
// asset-smasher options go here
},
dist: {
}
},
})
Type: String
Default value: No Default. This must be specified
The directory to output assets into
Type: String[]
Default value: [process.cwd()]
An array of asset paths
Type: String[]
Default value: ['**/*.*']
Array of glob patterns for assets that should be output (other assets will be filtered out/not processed)
Type: String
Default value: ''
Prefix to append to logical paths when constructing urls. use if output dir is not served from the root of your web app
Type: Boolean
Default value: false
Whether to compress JavaScript and CSS assets
Type: Boolean
Default value: false
Whether to output copies of the final assets with an MD5 hash of the contents appended to the file name (e.g. myasset-xxxxxxxxxxxxxxxxxxxx.js)
Type: Boolean
Default value: false
Whether to output a copy of the final assets gzipped
Type: String
Default value: 1.0
Change this value if you want to invalidate all of your assets (the version is included when computing the hash value for an asset)
Type: Object
Default value: {}
Helpers/values to pass into transformers (e.g. the ejs
transformer exposes these as local variables)
Type: Boolean|Object
Default value: false
Whether to enable AMD module support. Either a boolean can be passed in, or an object of the form
{
baseLogicalPath: 'base/path' // The value defaults to '' and will be stripped off of all logical paths before constructing module ids
}
Type: Boolean
Default value: false
Whether verbose information should be printed out to stdout when compiling
Type: Boolean
Default value: false
Whether to prevent deletion of the output directory before compilation
This will compile all files in my/assets
and output them to output/dir
grunt.initConfig({
asset_smasher: {
options: {
paths: ['my/assets'],
outputTo: 'output/dir'
}
},
})
This compiles only the manifest files in several asset paths, compresses the result, and creates hashed versions of the files.
grunt.initConfig({
asset_smasher: {
options: {
paths: ['my/assets', 'my/otherassets'],
outputTo: 'output/dir',
only: ['**/*.mf'],
prefix: 'assets',
compress: true,
hash: true
}
},
})
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Initial release - Compatible with asset-smasher
0.3.x
FAQs
Run asset-smasher from Grunt
The npm package grunt-asset-smasher receives a total of 3 weekly downloads. As such, grunt-asset-smasher popularity was classified as not popular.
We found that grunt-asset-smasher 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.