Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
gulp-recipe-loader
Advanced tools
Automatic gulp recipe loading and task registration
// deps
var gulp = require('gulp'),
requireDir = require('require-dir');
// read config files from ./gulp-config directory
var config = requireDir('gulp-config');
// load all recipes
var $ = require('gulp-recipe-loader')(gulp, config);
// mark build task as default
$.gulp.task('default', ['build']);
First of all, define your defualt base path. It has to be a real path. Default value is '.'
, but most probably wou will need to change it.
All paths are relative to gulpfile location.
sources.defaultBase = 'app/';
There are few ways to define source. The most basic one is just a string with glob path.
sources.css = 'app/styles/*.css';
You can also provide an array of globs or other sources.
sources.bowerScripts = [
'app/bower_components/*/*.js',
'app/bower_components/*/{dist,min,release}/*.js',
];
If you need to change the base for specific set of paths, you can use object notation.
sources.specialFiles = {
files: 'special/**/*', // the 'files' can be any valid source. A glob or array of globs will work.
base: 'special/'
};
Sources can be easily composited. You can use any valid source inside the other.
sources.devAssets = [
sources.js,
sources.css,
'app/icons/**/icon-*.svg',
sources.tempFiles
]
Important note: If you nest other sources inside source object, the properties of the outer object will be applied.
sources.myFiles = {
files: 'defs/scene-*.xml',
base: 'defs/'
};
// this is BAD
sources.moreFiles = {
files: [sources.assets, 'more/*.files'],
base: 'more/'
}
The actual content of sources.moreFiles
will be identical to this:
// actual output of that BAD thing
sources.moreFiles = {
files: ['defs/scene-*.xml', 'more/*.files'],
base: 'hello/' // note mismatched base for first file definition
}
What you probably wanted to do instead is
// this is GOOD
sources.moreFiles = [
sources.myFiles, // the base is preserved
{
files: 'more/*.files',
base: 'more/'
}
]
FAQs
Gulp environment with receipe modules autoloading with hooks
We found that gulp-recipe-loader 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.