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-sourcemaps/identity-map
Advanced tools
Gulp plugin for generating an identity sourcemap for a file.
@gulp-sourcemaps/identity-map is a Gulp plugin that generates a source map for a file by assuming the file content is the result of a transformation. It is useful for cases where you want to generate source maps for files that have already been transformed by other tools.
Generate Source Maps
This feature allows you to generate source maps for JavaScript files. The code sample demonstrates how to use the @gulp-sourcemaps/identity-map plugin in a Gulp task to generate source maps for all JavaScript files in the 'src' directory and output them to the 'dist' directory.
const gulp = require('gulp');
const sourcemaps = require('gulp-sourcemaps');
const identityMap = require('@gulp-sourcemaps/identity-map');
gulp.task('sourcemap', function () {
return gulp.src('src/**/*.js')
.pipe(sourcemaps.init())
.pipe(identityMap())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('dist'));
});
gulp-sourcemaps is a Gulp plugin that allows you to generate source maps for various types of files. It provides more flexibility and options compared to @gulp-sourcemaps/identity-map, as it can be used with a variety of other Gulp plugins to generate source maps for different types of transformations.
gulp-uglify is a Gulp plugin that minifies JavaScript files. While its primary purpose is not to generate source maps, it can be used in conjunction with gulp-sourcemaps to generate source maps for minified files. This makes it a complementary tool to @gulp-sourcemaps/identity-map when working with minified JavaScript.
gulp-babel is a Gulp plugin that transpiles ES6+ JavaScript to ES5 using Babel. It can be used with gulp-sourcemaps to generate source maps for the transpiled code. This makes it a useful tool for generating source maps for JavaScript files that have been transformed by Babel, similar to @gulp-sourcemaps/identity-map.
Gulp plugin for generating an identity sourcemap for a file.
var identityMap = require('@gulp-sourcemaps/identity-map');
gulp.src(...)
.pipe(sourcemaps.init())
.pipe(identityMap()) // .js and .css files will get a generated sourcemap
.pipe(sourcemaps.write())
.pipe(gulp.dest(...))
identityMap()
Returns an objectMode
Transform stream that processes each file with a .sourceMap
property and buffered contents. A sourcemap is generated and attached for each .js
and .css
file.
MIT
FAQs
Gulp plugin for generating an identity sourcemap for a file.
The npm package @gulp-sourcemaps/identity-map receives a total of 0 weekly downloads. As such, @gulp-sourcemaps/identity-map popularity was classified as not popular.
We found that @gulp-sourcemaps/identity-map demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
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.