Skip to content

Commit 9f9a544

Browse files
author
m31271n
committed
init: initial commit
1 parent 2bfdeb2 commit 9f9a544

File tree

14 files changed

+375
-8
lines changed

14 files changed

+375
-8
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.eslintrc.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
root: true
3+
plugins:
4+
- node
5+
extends:
6+
- eslint:recommended
7+
- plugin:node/recommended
8+
- plugin:prettier/recommended
9+

.gitattributes

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
## GITATTRIBUTES FOR WEB PROJECTS
2+
#
3+
# https://github.com/alexkaratarakis/gitattributes
4+
#
5+
# These settings are for any web project.
6+
#
7+
# Details per file setting:
8+
# text These files should be normalized (i.e. convert CRLF to LF).
9+
# binary These files are binary and should be left untouched.
10+
#
11+
# Note that binary is a macro for -text -diff.
12+
######################################################################
13+
14+
## AUTO-DETECT
15+
## Handle line endings automatically for files detected as
16+
## text and leave all files detected as binary untouched.
17+
## This will handle all files NOT defined below.
18+
* text=auto
19+
20+
## SOURCE CODE
21+
*.bat text eol=crlf
22+
*.coffee text
23+
*.css text
24+
*.htm text
25+
*.html text
26+
*.inc text
27+
*.ini text
28+
*.js text
29+
*.json text
30+
*.jsx text
31+
*.less text
32+
*.od text
33+
*.onlydata text
34+
*.php text
35+
*.pl text
36+
*.py text
37+
*.rb text
38+
*.sass text
39+
*.scm text
40+
*.scss text
41+
*.sh text eol=lf
42+
*.sql text
43+
*.styl text
44+
*.tag text
45+
*.ts text
46+
*.tsx text
47+
*.xml text
48+
*.xhtml text
49+
50+
## DOCKER
51+
*.dockerignore text
52+
Dockerfile text
53+
54+
## DOCUMENTATION
55+
*.markdown text
56+
*.md text
57+
*.mdwn text
58+
*.mdown text
59+
*.mkd text
60+
*.mkdn text
61+
*.mdtxt text
62+
*.mdtext text
63+
*.txt text
64+
AUTHORS text
65+
CHANGELOG text
66+
CHANGES text
67+
CONTRIBUTING text
68+
COPYING text
69+
copyright text
70+
*COPYRIGHT* text
71+
INSTALL text
72+
license text
73+
LICENSE text
74+
NEWS text
75+
readme text
76+
*README* text
77+
TODO text
78+
79+
## TEMPLATES
80+
*.dot text
81+
*.ejs text
82+
*.haml text
83+
*.handlebars text
84+
*.hbs text
85+
*.hbt text
86+
*.jade text
87+
*.latte text
88+
*.mustache text
89+
*.njk text
90+
*.phtml text
91+
*.tmpl text
92+
*.tpl text
93+
*.twig text
94+
95+
## LINTERS
96+
.csslintrc text
97+
.eslintrc text
98+
.htmlhintrc text
99+
.jscsrc text
100+
.jshintrc text
101+
.jshintignore text
102+
.stylelintrc text
103+
104+
## CONFIGS
105+
*.bowerrc text
106+
*.cnf text
107+
*.conf text
108+
*.config text
109+
.browserslistrc text
110+
.editorconfig text
111+
.gitattributes text
112+
.gitconfig text
113+
.htaccess text
114+
*.npmignore text
115+
*.yaml text
116+
*.yml text
117+
browserslist text
118+
Makefile text
119+
makefile text
120+
121+
## HEROKU
122+
Procfile text
123+
.slugignore text
124+
125+
## GRAPHICS
126+
*.ai binary
127+
*.bmp binary
128+
*.eps binary
129+
*.gif binary
130+
*.ico binary
131+
*.jng binary
132+
*.jp2 binary
133+
*.jpg binary
134+
*.jpeg binary
135+
*.jpx binary
136+
*.jxr binary
137+
*.pdf binary
138+
*.png binary
139+
*.psb binary
140+
*.psd binary
141+
*.svg text
142+
*.svgz binary
143+
*.tif binary
144+
*.tiff binary
145+
*.wbmp binary
146+
*.webp binary
147+
148+
## AUDIO
149+
*.kar binary
150+
*.m4a binary
151+
*.mid binary
152+
*.midi binary
153+
*.mp3 binary
154+
*.ogg binary
155+
*.ra binary
156+
157+
## VIDEO
158+
*.3gpp binary
159+
*.3gp binary
160+
*.as binary
161+
*.asf binary
162+
*.asx binary
163+
*.fla binary
164+
*.flv binary
165+
*.m4v binary
166+
*.mng binary
167+
*.mov binary
168+
*.mp4 binary
169+
*.mpeg binary
170+
*.mpg binary
171+
*.ogv binary
172+
*.swc binary
173+
*.swf binary
174+
*.webm binary
175+
176+
## ARCHIVES
177+
*.7z binary
178+
*.gz binary
179+
*.jar binary
180+
*.rar binary
181+
*.tar binary
182+
*.zip binary
183+
184+
## FONTS
185+
*.ttf binary
186+
*.eot binary
187+
*.otf binary
188+
*.woff binary
189+
*.woff2 binary
190+
191+
## EXECUTABLES
192+
*.exe binary
193+
*.pyc binary

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
yarn.lock

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.prettierrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
singleQuote: true
2+
trailingComma: none

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js:
3+
- '9'
4+
- '8'

LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Copyright (c) 2018 m31271n <[email protected]> (https://stack.m31271n.com)
2+
All rights reserved.

README.md

Lines changed: 59 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,66 @@
1-
# qcloud-upload
1+
# qcup
22

3+
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
4+
[![Dependency Status](https://img.shields.io/david/m31271n/qcup.svg)](#)
5+
[![DevDependency Status](https://img.shields.io/david/m31271n/qcup.svg)](#)
6+
[![Travis Build Status](https://img.shields.io/travis/m31271n/qcup.svg)](#)
7+
[![NPM Downloads](https://img.shields.io/npm/dm/qcup.svg)](#)
8+
9+
10+
> Efficient file uploader for QCloud.
11+
12+
## Install
13+
14+
```
15+
$ npm install qcup
16+
```
317

418
## Usage
19+
20+
```js
21+
const qcup = require('qcup');
22+
23+
qcup('unicorns');
24+
//=> 'unicorns & rainbows'
25+
```
26+
27+
## API
28+
29+
### qcup(input, [options])
30+
31+
#### input
32+
33+
Type: `string`
34+
35+
Lorem ipsum.
36+
37+
#### options
38+
39+
##### foo
40+
41+
Type: `boolean`<br>
42+
Default: `false`
43+
44+
Lorem ipsum.
45+
46+
## CLI
47+
48+
```
49+
$ npm install --global qcup
550
```
6-
QCLOULD_UPLOAD_TOKEN=xxx qcl [-bucket=default] [-cache=true] dist hi
51+
752
```
53+
$ qcup --help
54+
55+
Usage
56+
qcup [input]
857
9-
## Features
58+
Options
59+
--foo Lorem ipsum [Default: false]
1060
11-
- hash check(prevent re-upload)
12-
- cache control(by -cache)
13-
- concurrent upload
14-
- retry on failure
15-
- progress display
61+
Examples
62+
$ qcup
63+
unicorns & rainbows
64+
$ qcup ponies
65+
ponies & rainbows
66+
```

package.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"name": "qcup",
3+
"version": "0.0.0",
4+
"description": "Efficient file uploader for QCloud.",
5+
"repository": "m31271n/qcup",
6+
"author": {
7+
"name": "m31271n",
8+
"email": "[email protected]",
9+
"url": "stack.m31271n.com"
10+
},
11+
"bin": "src/cli.js",
12+
"engines": {
13+
"node": ">=8"
14+
},
15+
"scripts": {
16+
"precommit": "lint-staged",
17+
"lint": "eslint 'src/**/*.js' 'test/**/*.js'",
18+
"test": "ava",
19+
"code-quality": "npm run lint && npm run test"
20+
},
21+
"files": [
22+
"src"
23+
],
24+
"main": "src/index.js",
25+
"keywords": [
26+
"cli",
27+
""
28+
],
29+
"dependencies": {
30+
"yargs": "^8.0.1"
31+
},
32+
"devDependencies": {
33+
"ava": "*",
34+
"eslint": "^4.19.1",
35+
"eslint-plugin-ava": "^4.5.1",
36+
"eslint-plugin-node": "^6.0.1",
37+
"eslint-plugin-prettier": "^2.6.0",
38+
"eslint-config-prettier": "^2.9.0",
39+
"husky": "^0.14.3",
40+
"lint-staged": "^7.0.4",
41+
"prettier": "^1.11.1"
42+
},
43+
"lint-staged": {
44+
"linters": {
45+
"**/*.js": [
46+
"prettier --write",
47+
"eslint",
48+
"git add"
49+
],
50+
"**/*.{json,md}": [
51+
"prettier --write",
52+
"git add"
53+
]
54+
}
55+
},
56+
"private": true
57+
}

0 commit comments

Comments
 (0)