Skip to content

About

✨ A tiny command line tool that extract `package.json` version and generate `export const VERSION='...'` file. Useful when you want to package your software version.

Topics

Resources

Code of conduct

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

42 Commits

Folders and files

Repository files navigation

const-version

A tiny command line tool that extract package.json version and generate export const VERSION=x.y.z file. Useful when you want to package your software version.

chrvadala Test Coverage Status npm Downloads Donate

Install

npm install const-version

Usage

{
  "name": "yourproject",
  "version": "x.y.z",
  "scripts": {
    "generate-version": "const-version ./package.json ./src/version.js"
  }
}

Example of a generated file

  // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
  export const VERSION = 'x.y.z';

Changelog

  • v1.0 - First release
  • v2.0 - Changes some dependencies
  • v2.1 - Shrinks and upgrades deps; Implements gh-actions; Improves docs; Implements standard.js; Increases code coverage

Contributors

About

✨ A tiny command line tool that extract `package.json` version and generate `export const VERSION='...'` file. Useful when you want to package your software version.

Topics

Resources

Code of conduct

Stars

3 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages