
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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 2 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.