🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@thtf/versions-webpack-plugin-ex

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thtf/versions-webpack-plugin-ex

版本日志

latest
npmnpm
Version
0.0.2
Version published
Maintainers
2
Created
Source

Versions Webpack Plugin

If your webpack < 4, please use the version of 1.x with the same configuration.

Plugin that create informations of versions.

Installing

Using npm:

npm install versions-webpack-plugin

Using yarn:

yarn add versions-webpack-plugin

Example

Basic

    const VersionsWebpackPlugin = require('versions-webpack-plugin')
    
    module.exports = {
        entry: 'index.js',
        output: {
            path: __dirname + '/dist',
            filename: 'index_bundle.js'
        },
        plugins: [
            new VersionsWebpackPlugin()
        ]
    }


    // versions.txt
    Basic: 
        build date: 2019-08-01 11:58:54

    Git: 
        commit: 4a2cdd89d3bc1fd051649d104f7ea643ec566dfc

Options

    const options = {

        filename: 'versions.txt',

        basic: true,
        // basic: {
        //     date: true,
        //     filelist: false
        // },

        git: true,
        // git: {
        //     commit: true,
        //     author: false,
        //     date: false
        // },

        // callback: versions => 'This is a versions file!',
        // callback: versions => {
        //     versions.push({ title: 'My versions', infos: [{ key: 'version', value: require('./package.json').version }] })
        //     return versions;
        // },
    }

Keywords

webpack

FAQs

Package last updated on 23 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts