Skip to content

gnandretta/babel-plugin-version-inline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-version-inline

Turn __VERSION__ into the package's version string.

Example

Given the following package.json.

{
  "name": "package-using-babel-plugin-version-inline",
  "version": "1.0.0"
}

in

__VERSION__

out

"1.0.0"

Installation

$ npm install babel-plugin-version-inline

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["version-inline"]
}

Via CLI

$ babel --plugins version-inline script.js

Via Node API

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

About

Babel plugin for turning __VERSION__ into a package version string

Resources

License

Stars

Watchers

Forks

Packages

No packages published