{"name":"gulp-babel","version":"8.1.0","description":"Use next generation JavaScript, today","license":"MIT","repository":{"type":"git","url":"git+https://github.com/babel/gulp-babel.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"contributors":[{"name":"Charles Samborski","email":"demurgos@demurgos.net","url":"demurgos.net"}],"engines":{"node":">=6"},"scripts":{"test":"mocha"},"pre-commit":{"run":["test"]},"keywords":["gulpplugin","babel","transpiler","es2015","es2016","es2017","rewriting","transformation","syntax","codegen","desugaring","javascript","compiler"],"dependencies":{"plugin-error":"^1.0.1","replace-ext":"^1.0.0","through2":"^3.0.0","vinyl-sourcemaps-apply":"^0.2.0"},"peerDependencies":{"@babel/core":"^7.0.0 || ^8.0.0"},"devDependencies":{"@babel/core":"^7.0.0","@babel/plugin-transform-arrow-functions":"^7.0.0","@babel/plugin-transform-block-scoping":"^7.0.0","@babel/plugin-transform-classes":"^7.0.0","gulp-sourcemaps":"^2.6.4","mocha":"^6.2.1","pre-commit":"^1.2.2","vinyl":"^2.1.0"},"gitHead":"4ce705904a75414e84331c50a7c18141d46a6196","_id":"gulp-babel@8.1.0","bugs":{"url":"https://github.com/babel/gulp-babel/issues"},"homepage":"https://github.com/babel/gulp-babel#readme","_nodeVersion":"26.1.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-QtFF9+h3xrVjfo79h7HCY4S8k4qNEcOz7ffpfavlscv0F0glfTQyv4kEYvX+YykTm4qllMF4aZfjeqLjzddTYA==","shasum":"d0c1cb4b53d6002eec350b866b54e9807a4c7ea3","tarball":"http://registry-npm.ywwl.com/gulp-babel/download/gulp-babel-8.1.0.tgz","fileCount":4,"unpackedSize":7894,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCggXW1NpS7ECvfbIN9F4lo6cMBcVhH8eY80xUVTkVwlAIgZ4WDRphT+HyFsqyfGy1aJtB+LeMEPdKXVnBNZ884NLo="}],"size":3396,"noattachment":false,"key":"/gulp-babel/-/gulp-babel-8.1.0.tgz"},"_npmUser":{"name":"nicolo-ribaudo","email":"hello+npm@nicr.dev"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"},{"name":"hzoo","email":"hi@henryzoo.com"},{"name":"sebmck","email":"sebmck@gmail.com"},{"name":"loganfsmyth","email":"loganfsmyth@gmail.com"},{"name":"existentialism","email":"bng412@gmail.com"},{"name":"nicolo-ribaudo","email":"hello+npm@nicr.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gulp-babel_8.1.0_1781869717056_0.414562477577642"},"_hasShrinkwrap":false,"readme":"> This readme is for gulp-babel v8 + Babel v7/v8\n> Check the [7.x branch](https://github.com/babel/gulp-babel/tree/v7-maintenance) for docs with Babel v6 usage\n\n# gulp-babel [![npm](https://img.shields.io/npm/v/gulp-babel.svg?maxAge=2592000)](https://www.npmjs.com/package/gulp-babel) [![Build Status](https://travis-ci.org/babel/gulp-babel.svg?branch=master)](https://travis-ci.org/babel/gulp-babel)\n\n> Use next generation JavaScript, today, with [Babel](https://babeljs.io)\n\n*Issues with the output should be reported on the Babel [issue tracker](https://phabricator.babeljs.io/).*\n\n\n## Install\n\nInstall `gulp-babel` if you want to get the pre-release of the next version of `gulp-babel`.\n\n```\n# Babel 7\n$ npm install --save-dev gulp-babel @babel/core @babel/preset-env\n\n# Babel 6\n$ npm install --save-dev gulp-babel@7 babel-core babel-preset-env\n```\n\n## Usage\n\n```js\nconst gulp = require('gulp');\nconst babel = require('gulp-babel');\n\ngulp.task('default', () =>\n\tgulp.src('src/app.js')\n\t\t.pipe(babel({\n\t\t\tpresets: ['@babel/preset-env']\n\t\t}))\n\t\t.pipe(gulp.dest('dist'))\n);\n```\n\n\n## API\n\n### babel([options])\n\n#### options\n\nSee the Babel [options](http://babeljs.io/docs/en/options), except for `sourceMaps` and `filename` which is handled for you. Also, keep in mind that options will be loaded from [config files](http://babeljs.io/docs/en/config-files) that apply to each file.\n\n## Source Maps\n\nUse [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) like this:\n\n```js\nconst gulp = require('gulp');\nconst sourcemaps = require('gulp-sourcemaps');\nconst babel = require('gulp-babel');\nconst concat = require('gulp-concat');\n\ngulp.task('default', () =>\n\tgulp.src('src/**/*.js')\n\t\t.pipe(sourcemaps.init())\n\t\t.pipe(babel({\n\t\t\tpresets: ['@babel/preset-env']\n\t\t}))\n\t\t.pipe(concat('all.js'))\n\t\t.pipe(sourcemaps.write('.'))\n\t\t.pipe(gulp.dest('dist'))\n);\n```\n\n\n## Babel Metadata\n\nFiles in the stream are annotated with a `babel` property, which contains the metadata from [`babel.transform()`](https://babeljs.io/docs/usage/api/).\n\n#### Example\n\n```js\nconst gulp = require('gulp');\nconst babel = require('gulp-babel');\nconst through = require('through2');\n\nfunction logBabelMetadata() {\n\treturn through.obj((file, enc, cb) => {\n\t\tconsole.log(file.babel.test); // 'metadata'\n\t\tcb(null, file);\n\t});\n}\n\ngulp.task('default', () =>\n\tgulp.src('src/**/*.js')\n\t\t.pipe(babel({\n\t\t\t// plugin that sets some metadata\n\t\t\tplugins: [{\n\t\t\t\tpost(file) {\n\t\t\t\t\tfile.metadata.test = 'metadata';\n\t\t\t\t}\n\t\t\t}]\n\t\t}))\n\t\t.pipe(logBabelMetadata())\n)\n```\n\n\n## Runtime\n\nIf you're attempting to use features such as generators, you'll need to add `transform-runtime` as a plugin, to include the Babel runtime. Otherwise, you'll receive the error: `regeneratorRuntime is not defined`.\n\nInstall the runtime:\n\n```\n$ npm install --save-dev @babel/plugin-transform-runtime\n$ npm install --save @babel/runtime\n```\n\nUse it as plugin:\n\n```js\nconst gulp = require('gulp');\nconst babel = require('gulp-babel');\n\ngulp.task('default', () =>\n\tgulp.src('src/app.js')\n\t\t.pipe(babel({\n\t\t\tplugins: ['@babel/transform-runtime']\n\t\t}))\n\t\t.pipe(gulp.dest('dist'))\n);\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n","publish_time":1781869717206,"_cnpm_publish_time":1781869717206,"dist-tags":{"latest":"8.1.0","next":"8.0.0-beta.2"}}