An open API service indexing awesome lists of open source software.

https://github.com/lgkonline/put-version

A small tool to put the version from your package.json to all ressources in a HTML document.
https://github.com/lgkonline/put-version

command-line-tool config format formatting prettier tool

Last synced: 10 months ago
JSON representation

A small tool to put the version from your package.json to all ressources in a HTML document.

Awesome Lists containing this project

README

          

# put-version

With this tool you can archieve to turn this:
```

```
to this:
```

```

## Why?
Browsers cache scripts and stylesheets. When you change the path like this you force the browser to receive the latest versions.

## Install
Install it easily with NPM:
```
npm i put-version -D
```

## Usage
```
put-version [filePath]
```

Example: `put-version ./index.html`

Then you should register it your `package.json` so it will always get executed when you create a new build:
```
{
"name": "your-app",
"version": "1.0.0",
"scripts": {
"build": "put-version ./index.html"
},
...
}
```