Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
gulp-pragma
Advanced tools
A Gulp plugin to optionally remove pragma comments from your code that follow a particular pattern. Useful for JavaScript builds.
A Gulp plugin to optionally remove pragma comments from your code that follow a particular pattern. Useful for JavaScript builds.
npm install gulp-pragma
Pass a simple config object to pragma()
in your Gulp pipe. All the properties of the objects represent pragma tags. Set to false to remove them. Use all
if you want to just remove all pragma blocks.
The system will look for sections of code that have this signature:
// To remove this section use: pragma({ debug: false })
/* pragma:DEBUG_START */
var a = true;
console.warn("a is", a);
/* pragma:DEBUG_END */
// To remove this section use: pragma({ amd: false })
/* pragma:AMD_START */
var a = true;
console.warn("a is", a);
/* pragma:AMD_END */
Use in your gulpfile:
var pragma = require('gulp-pragma');
gulp.src(['/**/*.js'])
.pipe(pragma({
debug: false,
amd: false
}));
To remove all pragma blocks:
gulp.src(['/**/*.js'])
.pipe(pragma({
all: false
}));
Note: Its recommended you run this on your concatenated stream rather than your split-up file stream for performance reasons.
FAQs
A Gulp plugin to optionally remove pragma comments from your code that follow a particular pattern. Useful for JavaScript builds.
We found that gulp-pragma 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.