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

vite-plugin-pack-info

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-pack-info

Vite plugin generates an information file or fingerprint of a package after the construction is complete

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

vite-plugin-pack-info

npm

此插件为 vite 的扩展,用于在 vite build 命令执行的最后阶段,对构建产出目录之后进行生成相应的包的指纹信息或者版本信息,打包出来的文件名默认为robin-pack.json,里面包含git的信息 比如最后一次的提交信息,其中里面的version为package.json的version

Install

 npm/yarn/pnpm i -D vite-plugin-pack-info

Usage

// vite.config.js

import { defineConfig } from 'vite'
import packInfo from 'vite-plugin-pack-info'

export default defineConfig({
  plugins: [packInfo()],
})

Options

export interface Options {
  /**
   * Input Directory
   * @default `dist`
   */
  inDir?: string;
  /**
   * Output Directory
   * @default `robin-json`
   */
  outDir?: string;
  /**
   * file Name
   * @default `robin.json`
   */
  outFileName?: string;
  /**
   * version 
   * @default `timeStamp`
   */
  version?: string| number;
  /**
   * Callback, which is executed after the zip file was created
   * err is only defined if the save function fails
   */
  done?: (err: Error | undefined) => void
}

License

MIT, see the license file

Keywords

version

FAQs

Package last updated on 03 Aug 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