0.0.6 • Published 2 years ago

version-me v0.0.6

Weekly downloads
10
License
UNLICENSED
Repository
github
Last release
2 years ago

GitHub package.json version

version-me

some cheap dev-only lib to avoid manual updates of the version in multiple files (f.e. version.json/version.xml besides package.json)

where to use it?

the bundler config / somewhen else before any further pipelines

how to use

import { versionMe, xml } from 'versionMe'

versionMe()
// or
versionMe({ file: './dist/build-version.json' })
// or
versionMe({ customContent: ({ version }) => JSON.stringify({ CUSTOM_VERSION_KEY: version }) })
// or
versionMe({ file: './version.xml', customContent: (param) => xml(param) })
// or or or

environment variables it looks for

you must either provide the npm_package_version (provided by default if using a package manager to start the script) or VERSION by hand => VERSION whatever.js or yarn whatever (script in package.json which runs whatever.js somehow)

configurations

keydefault value  description
file'./version.json'sets the file path & name
customContent({ version }) => JSON.stringify({ version })adds the ability for custom file contents

provided formatters

  • json ({"version": "..."}) (default)
  • xml (<version>...</version>)
0.0.5

2 years ago

0.0.6

2 years ago

0.0.3

3 years ago

0.0.4

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago