Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Gulp module for managing asset revisions and using multiple domains to server assets.
Gulp module for managing asset revisions and paths.
Creates revision using md5 hash of file contents and replaces all occurances of path in referencing files. Also allows you to prefix asset urls for balancing across cdn domains. It will also ensure that a single file only ever comes from the one prefix so assets aren't double downloaded.
Install with npm
npm install --save-dev gulp-asset
var gulp = require('gulp');
var asset = require('gulp-asset');
asset.config({
prefix: ['http://cdn1.google.com', 'http://cdn2.google.com']
});
gulp.task('js', function () {
gulp.src('src/assets/js/**/*.js')
.pipe(asset.rev())
.pipe(asset.replace())
.pipe(gulp.dest('dist/assets/js'));
});
Example JavaScript file
// You can explicitly use an asset:// string
var image = 'asset://img/image.png';
var font = 'asset://fonts/test.eot';
// Or construct a path and use the window.__assets variable
var key = 'asset://' + 'fonts/' + 'test' + '.eot';
var font = window.__assets[key];
Example HTML file
<img src="asset://img/image.png">
Example CSS file
body {
background: blue url('asset://img/image.png');
}
FAQs
Gulp module for managing asset revisions and using multiple domains to server assets.
We found that gulp-asset 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.