Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chrvadala/const-version
:sparkles: 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.
https://github.com/chrvadala/const-version
bundle cli es6 javascript tool versioning
Last synced: about 1 month ago
JSON representation
:sparkles: 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.
- Host: GitHub
- URL: https://github.com/chrvadala/const-version
- Owner: chrvadala
- License: mit
- Created: 2017-01-20T10:38:01.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2023-02-26T15:47:21.000Z (over 1 year ago)
- Last Synced: 2024-10-05T12:05:51.052Z (about 2 months ago)
- Topics: bundle, cli, es6, javascript, tool, versioning
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/const-version
- Size: 244 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://img.shields.io/badge/website-chrvadala-orange.svg)](https://chrvadala.github.io)
[![Test](https://github.com/chrvadala/const-version/workflows/Test/badge.svg)](https://github.com/chrvadala/const-version/actions)
[![Coverage Status](https://coveralls.io/repos/github/chrvadala/const-version/badge.svg?branch=main)](https://coveralls.io/github/chrvadala/const-version?branch=main)
[![npm](https://img.shields.io/npm/v/const-version.svg?maxAge=2592000?style=plastic)](https://www.npmjs.com/package/const-version)
[![Downloads](https://img.shields.io/npm/dm/const-version.svg)](https://www.npmjs.com/package/const-version)
[![Donate](https://img.shields.io/badge/donate-GithubSponsor-green.svg)](https://github.com/sponsors/chrvadala)# Install
```sh
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
```js
// 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
- [chrvadala](https://github.com/chrvadala) (author)