Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

next release channel setup #135

Merged
merged 3 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module.exports = {
env: {
commonjs: true,
es2021: true,
node: true,
jest: true,
},
extends: ['eslint:recommended', 'prettier'],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
rules: {},
};
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
lib
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
lib
package-lock.json
.github
80 changes: 0 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,3 @@
## Command-line Usage

### Installation

```bash
npm install imgur -g
```

### Usage

Pass binary image files, urls, and/or [base64-encoded](http://en.wikipedia.org/wiki/Base64) image strings as arguments. Globbing is supported.

Upload a single image:

```bash
imgur cat.png
```

Upload multiple images ([globbing](<http://en.wikipedia.org/wiki/Glob_(programming)>) supported):

```bash
imgur cat.png cats.gif cats23.jpg

imgur ~/*.(jpg|png|gif)

imgur ~/Pictures/kittens/*.jpg ~/gifs/sfw/*.gif
```

Upload an image from another place on the web. Be sure to include http(s):

```bash
imgur --url https://octodex.github.com/images/topguntocat.png
```

Upload a Base-64 encoded image:

```bash
imgur --base64 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAmUlEQVQ4je2TsQ3CMBBFnxMa08WR2IQKJskIUNwMZAcYwWIQMs65JCUpEEIYW4pJy6v+6e6+/hVnnGsAzsCBMi7AsbbW/rIMsAU2xrnmkeruuzW7zgIw+JGbv6fGQpWzfy3HOsJlDQY/AlCv3jpF9oS5ZBOICKoB1YCIlCdQDR9127qyBHP5Gyw3CBXPr/qi709JHXE1S995AsqoJu8x78GsAAAAAElFTkSuQmCC
```

Saving a client id for subsequent use:

```bash
imgur --save f9ae01148b53261
```

Display saved client id:

```bash
imgur --show
```

Remove previously saved client id:

```bash
imgur --clear
```

Use a specific client id one time only (overrides saved id):

```bash
imgur --client-id f9ae01148b53261 --file ~/me.jpg

# Short-hand
imgur -c f9ae01148b53261 -f ~/me.jpg
```

Add images to an existing album by specifying an album ID:

```bash
imgur --album-id F8KTV --file ~/me.jpg

# Short-hand
imgur -a F8KTV ~/me.jpg
```

You must own the album. If it's an anonymous album you need to use the `deletehash` in place of the album ID.

## Module Usage

### Installation

```bash
Expand Down
8 changes: 8 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"presets": [
[
"@babel/preset-env",
{ "targets": { "node": "current" }, "modules": "commonjs" }
]
]
}
172 changes: 0 additions & 172 deletions cli.js

This file was deleted.

5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
module.exports = {
setupFilesAfterEnv: ['./jest.setup.js'],
testPathIgnorePatterns: [
'<rootDir>/build/',
'<rootDir>/node_modules/',
'<rootDir>/src/__tests__/mocks/',
],
};
2 changes: 1 addition & 1 deletion jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { server } = require('./lib/mocks/server.js');
const { server } = require('./src/__tests__/mocks/server.js');
const mockfs = require('mock-fs');

// Establish API mocking before all tests.
Expand Down
Loading