Skip to content

supreetpal/babel-plugin-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read babel plugin handbook -> https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md

Try http://astexplorer.net/#/Pcw9baefXI for a visual understanding.

babel-plugin-boilerplate

Add a description for the plugin here

Example

In

let tips = [
  "Paste or drop some JavaScript here and explore the syntax tree created by chosen parser.",
  "You can use all the cool new features from ES6 and even more. Enjoy!"
];

function printTips() {
  tips.forEach((tip, i) => console.log(`Tip ${i}:` + tip));
}

Out

let spit = ["Paste or drop some JavaScript here and explore the syntax tree created by chosen parser.", "You can use all the cool new features from ES6 and even more. Enjoy!"];

function spiTtnirp() {
  spit.hcaErof((pit, i) => elosnoc.gol(`Tip ${ i }:` + pit));
}

Installation

$ npm install babel-plugin-boilerplate

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["boilerplate"]
}

Via CLI

$ babel --plugins boilerplate script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["boilerplate"]
});

About

A setup to get you started on building babel plugins.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published