Skip to content

A simple example of writing a babel-plugin based on the tutorial from SitePoint

Notifications You must be signed in to change notification settings

mannanali413/babel-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-example

Understanding Abstract Symbol Tree (AST) by writing a simple plugin

The examples illustrated here are borrowed from Sitepoint Tutorial on creating Babel Plugin

For someone who would want to understand the project they can clone the repo.

After cloning the repo, run

  • npm install
  • node run.js test/case.ms

TODO's

  • Build a plugin which allows for the following operation
2 | double | square

// would become

square(double(2))
  • Use ** for exponentiation
2 ** 3

// will return

Math.pow(2,3)

About

A simple example of writing a babel-plugin based on the tutorial from SitePoint

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published