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

poject-deploy

v1.1.4

Published

发送指定目录或文件到远程服务器上

Downloads

46

Readme

poject-deploy说明文档

版本: 1.1.4 更新: 2020-06-10

poject-deploy是一个简单的远端服务器部署工具,主要实现:

  • 指定目录文件发送

  • 多服务器部署配置

  • v1.1.4 更新说明:补充选项,可配置强制通过分片上传,配置文件中加个patch,设置为true即可。一般是上传时遭到拦截,不允许上传js文件的情况比较适用

  • v1.1.3 更新说明:忘记部署完成删除临时文件了

  • v1.1.2 更新说明:没事不用更新这个版本,纯属后端作妖要强行插参数而已

  • v1.1.1 更新说明:添加分片上传

*后续按需求增加功能实现


使用说明

关于node和npm的安装就不说了,国内推荐使用cnpm

在项目中安装组件:

    npm i -S poject-deploy

在项目根目录下添加 deploy-conf.json 配置文件:

{
    "prod": {
        "receiver": "http://server-url",        // 部署服务器地址,不可缺少!
        "form": "/",                            // 文件目录,可缺省,默认为当前目录
        "to": "server-save-path",		        // 部署服务器保存的路径,可缺省,默认为当前目录, 开启zip会默认重置为/,并且把目录包裹到要发送的文件夹上,即receiver为根目录
        "data": {},                             // 传送文件请求附加参数,可选
        "ignore": [],                           // 忽略文件,可选
        "scriptTag": "test-script",             // 如果遇到xss拦截script标签,可以编辑为自定义标签,让后端收到文件后把自定义标签还原为script标签,可选
        "zip": true,                            // 如果遇到xss全面拦截,可以转为压缩包发送,让后端收到文件后解压还原,设置后scriptTag失效,可选
        "script": "depConf.data.time=newDate/1" // 发送前运行可运行简单脚本逻辑,可选
    }
}

需要部署时在项目运行命令

	poject-deploy prod

注:项目如果有多个部署配置,在配置文件中直接写即可,部署时poject-deploy [配置名],不写默认会寻找prod配置,如果不存在会中止运行。