Giter Club home page Giter Club logo

qshell-cli's Introduction

qshell-cli

自动安装七牛命令行工具 qshellNode.js 项目的依赖里

安装

npm install qshell-cli --save-dev

使用

第 1 种:直接使用原始的 qshell 可执行文件

./node_modules/qshell-cli/vendor/qshell -h

第 2 种:推荐在 NPM Scripts 中使用,因为 NPM 会自动修改 PATH 环境变量

要用 npm run deploy 的方式上传文件到七牛,可以修改 package.json

{
  "scripts":{
    "deploy":"qshell qupload qiniu.config.js" 
  }
}

qiniu.config.jsqshell 上传文件的配置文件

关于

为什么把 qshell 当成一个 NPM 的依赖

qshell 这样的部署工具一般只有运维人员才会用到,但对于提倡 DevOps 文化的团队来说,把部署工具也放进项目依赖里会非常方便。 这一点也是受到了 12factor显式声明依赖关系 这一条的启发。

可选使用其它 CDN 地址

默认会从 http://devtools.qiniu.com/qshell-{version}.zip 来下载,你也可以使用其它的地址:

npm config qshell_cdnurl='http://10.0.0.1/path/qshell-{version}.zip'

不过 qshell-cli 为了保障安全和完整性,压缩包下载完成后会强制做 md5 校验,所以请确保使用从七牛官方下载的原始压缩包。

Inspired by

https://github.com/Medium/phantomjs/blob/master/install.js

Lincense

MIT


We <3 Qiniu

qshell-cli's People

Contributors

longtian avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

watsy0007

qshell-cli's Issues

Version:2.0.5, Exit status 1, when I run npm run deploy

npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/Cellar/node/7.5.0/bin/node" "/usr/local/bin/npm" "run" "publish"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] publish: `qshell qupload qiniu.config.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] publish script 'qshell qupload qiniu.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the dashboard package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     qshell qupload qiniu.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs dashboard
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls dashboard
npm ERR! There is likely additional logging output above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.