babel/grunt-babel


Grunt plugin for Babel

https://babeljs.io

License: MIT

Language: JavaScript

Keywords: babel, grunt-plugin


This readme is for grunt-babel v8 + Babel v7 Check the 7.x branch for docs with Babel v6

grunt-babel Build Status

Use next generation JavaScript, today, with Babel

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

Install

For Babel 7.x and grunt-babel v8

$ yarn add --dev grunt-babel @babel/core @babel/preset-env

For Babel 6.x and grunt-babel v7

$ yarn add --dev grunt-babel@7 @babel-core babel-preset-env

Note: See the 7.x branch for more examples of usage of Babel 6.x. This README is primarily applicable for Babel 7.x

Usage

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

grunt.initConfig({
  babel: {
    options: {
      sourceMap: true,
      presets: ['@babel/preset-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

Project Statistics

Sourcerank 18
Repository Size 133 KB
Stars 417
Forks 68
Watchers 16
Open issues 7
Dependencies 104
Contributors 7
Tags 17
Created
Last updated
Last pushed

Top Contributors See all

Sindre Sorhus XhmikosR Elan Shanker Stefan Bruvik Benjamin Winterberg Than Nguyen

Packages Referencing this Repo

grunt-babel-fixed
Use next generation JavaScript, today
Latest release 6.0.0 - Published - 417 stars
grunt-babel
Use next generation JavaScript, today
Latest release 8.0.0 - Updated - 417 stars
grunt-6to5
Turn ES6 code into vanilla ES5 with no runtime required
Latest release 3.0.1 - Updated - 417 stars

Recent Tags See all

v8.0.0 September 07, 2018
v8.0.0-beta.1 September 05, 2018
v8.0.0-beta.0 March 19, 2018
v7.0.0 August 08, 2017
v6.0.0 October 30, 2015
v5.0.3 September 20, 2015
v5.0.2 September 17, 2015
5.0.1 June 05, 2015
v5.0.0 April 02, 2015
v4.0.0 February 15, 2015
v3.0.1 February 04, 2015
v3.0.0 January 28, 2015
v1.0.2 December 17, 2014
v1.0.1 October 09, 2014
v1.0.0 October 08, 2014

Something wrong with this page? Make a suggestion

Last synced: 2016-10-26 01:53:36 UTC

Login to resync this repository