npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@squirreljs/squirrel-vite-plugin-filemanager

v0.1.2

Published

🐿️ Squirrel Vite Plugin File Manager is a Vite plugin for packaging multiple folders into individual zip files, simplifying deployment and organization. Enhance your Vite projects with this handy tool!

Downloads

6

Readme

Squirrel Vite Plugin File Manager

🎉 Squirrel Vite Plugin File Manager 是一款用於打包多個文件夾為單獨zip 文件的Vite 插件,簡化部署和組織項目。用這個實用工具提升你的Vite 項目體驗!

輕鬆掌握Vite 產物打包

  • 👉 這是一款專門針對Vite 的Plugin,可以讓我們快速打包多個文件夾,生成zip 文件。再也不用擔心部署時丟失文件了,一鍵壓縮,方便快捷!👏
  • 💡 想像一下,你在開發過程中需要使用到多個文件夾,這時候你只需要在Vite 配置中加入該插件,就能將它們全部打包為zip 文件,方便部署和傳輸。簡直是程序猿的福音啊!😍
  • 🎁 當然啦,這個庫並不止於此,它還支持自定義名稱、路徑等參數,滿足你各種奇奇怪怪的需求!畢竟,每位程序猿都有自己的小習慣和愛好嘛。😝
  • 🔽 如果你也想嘗試一下這個神奇的插件,記得來github 上下載or 使用npm 包哦~ 🤗

使用方法

// Path: path/to/vite.config.ts
import { defineConfig } from 'vite';
import fileManager from '@squirreljs/squirrel-vite-plugin-filemanager';
import type { FileManagerConfigurationOptions } from '@squirreljs/squirrel-vite-plugin-filemanager';

const fileManagerConfiguration: FileManagerConfigurationOptions = {
  delete: ['./dist/*.zip'],
  filter: ['.DS_Store', '.', '..'],
  archive: [
    { source: './dist', destination: './dist/front-end.zip' },
    { source: '../server/src', destination: './dist/back-end.zip' },
    { source: '../server/package.json', destination: './dist/package.json' }
  ]
};

export default defineConfig({
  plugins: [fileManager(fileManagerConfiguration)]
});

參數說明

interface ArchiveFile {
  source: string;
  destination: string;
}

interface FileManagerConfigurationOptions {
  delete?: Array<string>;
  filter?: Array<RegExp | string>;
  archive?: ArchiveFile[];
}

| 參數| 說明| 類型| 默認值| | ------- | ------------ | ----------------------- | ------ | | delete | 刪除指定文件 | Array<string> | [] | | filter | 過濾指定文件 | Array<RegExp | string> | [] | | archive | 打包指定文件 | ArchiveFile[] | [] |

ArchiveFile

| 參數| 說明| 類型| 默認值| | ----------- | ------------ | ------ | ------ | | source | 源文件路徑 | string | - | | destination | 目標文件路徑 | string | - |

效果展示

[vite-plugin-filemanager] 👻 delete file(director): ./dist/*.zip successfully.
[vite-plugin-filemanager] 👻 archive file: ./dist -> ./dist/front-end.zip successfully.
[vite-plugin-filemanager] 👻 archive file: ../pgos-server/src -> ./dist/back-end.zip successfully.

License

SquirrelJS © 2023 - MIT License