0.0.1 • Published 8 years ago
version-file-generator-webpack-plugin v0.0.1
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-pluginConfiguration
// 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: {}
}0.0.1
8 years ago