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

deploy-qy

v1.1.5

Published

前端自动化发布,仅支持docker发布

Downloads

4

Readme

下载依赖

npm i deploy-qy -D   或者  yarn add deploy-qy -D

按照自己的实际情况去填写 每个配置项都必填

在 根文件夹 创建一个名为 “envConfig.js” 的文件,内容为(这里只配置了一个环境,如果需要更多环境在数组中添加即可)

exports.envSetting = [
    {
        envName: '正式环境',
        maxBuffer: 5000 * 1024,
        buildCommand: 'yarn build',                //打包命令
        buildFileName: 'dist',                     //打包之后的文件夹名称 //必须填写你项目打完包后的名字 dist或build
        dockerFileName: 'dockerfile',              //dockerfile文件名
        remoteFileRoot: '/root/deploy',           //远程文件根目录  地址栏地址
        dockerAddress: 'harbor.sypesco.com:5000/ry_wdl/consumer-managing-frontend:latest', //docker镜像地址
        isDockerRun: false,                         //是否把打包成的镜像生成容器
        dockerName: '',                             //容器名称
        configServer: {
            host: 'xxxxxx',    //登录地址
            username: 'xxxxxx',        //用户名
            port: 22,                //端口
            password: 'xxxxxx',  //登录密码
            privateKeyPath: '/home/steel/.ssh/id_rsa'
        }
    }
]

在根文件夹创建一个名为 “dockerfile” 的文件,为dockerfile配置文件(内容根据自己需求自定义)

FROM nginxinc/nginx-unprivileged 
# FROM nginx

# 用echo添加多行内容
RUN cd /etc/nginx/conf.d/ && http_origin='$http_origin' && echo 'server {\n\
    listen       8080;\n\
    listen  [::]:8080;\n\
    server_name  localhost;\n\
    location / {\n\
        root   /usr/share/nginx/html;\n\
        add_header Access-Control-Allow-Methods *;\n\
        add_header Access-Control-Allow-Origin $http_origin;\n\
        index  index.html index.htm;\n\
  	try_files $uri $uri/ /index.html; \n\
    }\n\
    error_page   500 502 503 504  /50x.html;\n\
    location = /50x.html {\n\
        root   /usr/share/nginx/html;\n\
    }\n\
}\n'\
> default.conf
COPY dist/ /usr/share/nginx/html/

在package.json 的 script 中添加

"deploy": "node ./node_modules/deploy-qy",

如:

  "scripts": {
    "serve": "vue-cli-service serve",
    "build:": "vue-cli-service build",
    "deploy": "node ./node_modules/deploy-qy",
  },

最后运行 npm run deploy 执行部署

npm run deploy

———————————————————————————————————————————