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

vite-plugin-auto-deployer

v1.1.0

Published

👨‍💻Vite 自动化发布插件,解决频繁手动操作服务器的过程

Downloads

18

Readme

vite-plugin-auto-deployer

👨‍💻Vite 自动化发布插件,解决频繁手动操作服务器的过程

彻底解放你的双手!!!🤷‍♀️🤷‍♀️🤷‍♀️🤷‍♀️🤷‍♀️

从此让你不必再害怕 rm -rf * ,你懂得...👀

🛠️ 安装

# npm
npm install -D vite-plugin-auto-deployer

# yarn
yarn add -D vite-plugin-auto-deployer

# pnpm
pnpm add -D vite-plugin-auto-deployer

完成功能

-[✔] 📖 服务器列表配置,方便对服务器进行管理
-[✔] 👩‍🌾 自动读取环境变量匹配服务器上传,开发环境会忽略
-[✔] 📋 自动读取 outDir 目录,更加灵活 无需手动指定 dist 文件目录
-[✔] 📖 检测是否为系统路径,更安全,防止 /* 误删除服务器文件
-[✔] 🔐 主动询问用户名、密码,对服务器信息更安全

使用教程

// vite.config.js
import autoDeployer from "vite-plugin-auto-deployer";

// 单服务器
const serverInfo = {
  name: "测试环境",
  mode: "staging", // 配置对应环境
  host: "101.43.164.172", // 主机地址
  port: 22, // 端口
  // 避免服务器信息泄露,用户名、密码按个人所需是否记住,非必填,程序会提示进行
  username: "root",
  password: "xxxx",
  path: "/data/website_test" // 需要上传至的服务器目录
};

// 服务器列表
const serverList = [
  {
    name: "测试",
    mode: "staging",
    host: "101.43.164.172",
    port: 22,
    username: "root",
    password: "testxxxxxxx",  
    path: "/data/website_test"
  },
  {
    name: "生产环境部署",
    mode: "production",
    host: "101.43.164.172",
    port: 22,
    path: "/data/website_prod"
  }
];

// Vite配置
export default ({ mode, command }) => {
  const config = {
    base: "/",
    // 配置单个serverInfo or 列表serverList 
    plugins: [autoDeployer(serverInfo)] 
  };
  return defineConfig(config);
};

使用截图

🔐 用户名或密码为空时,提示输入,输入完会自动执行 ps:默认用户名为root

🎉🎉🎉🎉🎉🎉🎉🎉🎉

完结,撒花

⭐⭐⭐⭐⭐

如果您觉得本插件还行,麻烦 star 一下呗

你们的支持是我前进的动力!~

⭐⭐⭐⭐⭐