version-file-generator-webpack-plugin

0.0.1 • Public • Published

Version Generator Webpack Plugin

A plugin that generates a json file with the current timestamp and more.

Install

npm install --save-dev version-file-generator-webpack-plugin

Configuration

// Add to your Webpack config file
var VersionFileGeneratorWebpackPlugin = require('version-file-generator-webpack-plugin');

plugins: [new VersionFileGeneratorWebpackPlugin({
    outputFile: path.join(__dirname, '/version.json'),
    locale: 'en-US'
})]
// will output this:
{"date":"4/13/2018 15:03:48"}

Custom output

var VersionFileGeneratorWebpackPlugin = require('version-file-generator-webpack-plugin');

plugins: [new VersionFileGeneratorWebpackPlugin({
    outputFile: path.join(__dirname, '/version.json'),
    locale: 'pt-BR',
    content: JSON.stringify(/* your custom object goes here */)
})]
// will output the result of:
JSON.stringify(/* your custom object */)

API

var VersionFileGeneratorWebpackPlugin = require('version-file-generator-webpack-plugin');

{
    outputFile: '/path/to/your/file.json',
    locale: /* locale, defaults to 'en-US' */,
    content: {}
}

Package Sidebar

Install

npm i version-file-generator-webpack-plugin

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

3.3 kB

Total Files

5

Last publish

Collaborators

  • charlesrocha