kaynz / grunt-babel

Grunt plugin for Babel

Home Page:https://babeljs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grunt-babel Build Status

Use next generation JavaScript, today, with Babel

Issues with the output should be reported on the Babel issue tracker.

Install

$ npm install --save-dev @babel/core @babel/preset-env
$ npm install --save-dev https://github.com/kaynz/grunt-babel.git

Usage

require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks

grunt.initConfig({
	babel: {
		options: {
			sourceMap: true,
			presets: ['env']
		},
		dist: {
			files: {
				'dist/app.js': 'src/app.js'
			}
		}
	}
});

grunt.registerTask('default', ['babel']);

Options

See the Babel options, except for filename which is handled for you.

License

MIT © Sindre Sorhus

About

Grunt plugin for Babel

https://babeljs.io

License:MIT License


Languages

Language:JavaScript 100.0%