Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
cantina-assets
Advanced tools
Asset aggregator and minifier for Cantina applications.
Note: Currently very specific to a particular use-case (RequireJS/Marionette/Plain CSS).
Specify your app's CSS and JS files via styles
and scripts
keys,
respectively, in your conf. Then setup how cantina-assets
should handle them:
{
"assets": {
"optimize": "enabled" // Will run all optimizers on `app.start()`
"css": {
"foo": { // Custom namespaces allow for multiple aggregates.
"root": "/path/to/dir",
"dirs": [ // Additional directories from which to fetch "/public" files.
"/path/to/assets",
"/another/path"
],
"aggregate": true,
"prefix": true,
"minify": true,
"serve": true
"match": [ // Define an array of RegEx patterns to match files against.
"^/foo"
],
"exclude": [ // Define an array of RegEx patterns to exclude files.
"^do",
"not",
"want$"
]
}
},
"js": {
"bar": {
"aggregate": true,
"minify": true,
"serve": true
"match": [
"^/bar"
]
}
},
"templates": {
"baz": {
"aggregate": true,
"minify": false
}
}
}
}
If app.conf.get('assets:optimize') === 'enabled'
then your assets will be run
through the optimization steps as soon as app.start()
is called, respecting
all flags per namespace.
app.assets.[css|js|templates].aggregate (namespace, cb)
Aggregates asset files into one file, as per the conf's namespace definition.
app.assets.[css|js|templates].minify (namespace, cb)
Minifies asset files (only applies if they are aggregated as well).
app.assets.css.prefix (namespace, cb)
Adds certain vendor-prefixes to CSS attributes (only applies if they are aggregated as well).
app.assets.[css|js|templates].serve (namespace, cb)
Serves the optimized assets via dish (only applies if they are aggregated as well).
app.assets.[css|js|templates].[aggregate|minify|prefix|serve]All (cb)
Runs modifier on all namespaces.
app.assets.[css|js|templates].optimize (cb)
Runs all modifiers on all namespaces.
Terra Eclipse, Inc. is a nationally recognized political technology and strategy firm located in Santa Cruz, CA and Washington, D.C.
FAQs
Asset aggregator and minifier for Cantina applications.
The npm package cantina-assets receives a total of 8 weekly downloads. As such, cantina-assets popularity was classified as not popular.
We found that cantina-assets 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.