Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
flint-gulp-babel
Advanced tools
Turn ES6 code into vanilla ES5 with no runtime required using babel
Issues with the output should be reported on the babel issue tracker.
$ npm install --save-dev gulp-babel
var gulp = require('gulp');
var babel = require('gulp-babel');
gulp.task('default', function () {
return gulp.src('src/app.js')
.pipe(babel())
.pipe(gulp.dest('dist'));
});
See the babel
options, except for sourceMap
and filename
which is handled for you.
Use gulp-sourcemaps like this:
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var babel = require('gulp-babel');
var concat = require('gulp-concat');
gulp.task('default', function () {
return gulp.src('src/**/*.js')
.pipe(sourcemaps.init())
.pipe(babel())
.pipe(concat('all.js'))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('dist'));
});
Files in the stream are annotated with a babel
property, which
contains the metadata from babel.transform()
.
var gulp = require('gulp');
var babel = require('gulp-babel');
var through = require('through2');
function logFileHelpers() {
return through.obj(function (file, enc, cb) {
console.log(file.babel.usedHelpers);
cb(null, file);
});
}
gulp.task('default', function () {
return gulp.src('src/**/*.js')
.pipe(babel())
.pipe(logFileHelpers);
})
MIT © Sindre Sorhus
FAQs
Turn ES6 code into vanilla ES5 with no runtime required
The npm package flint-gulp-babel receives a total of 1 weekly downloads. As such, flint-gulp-babel popularity was classified as not popular.
We found that flint-gulp-babel 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.