Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Aug 21, 2019
1 parent e45c37c commit ea66cce
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 23 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* text=auto
*.js text eol=lf
* text=auto eol=lf
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
language: node_js
node_js:
- 'node'
- '12'
26 changes: 15 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,29 @@ const action = async context => {
method: 'post',
body: form
});
const id = JSON.parse(response.body).data.id;
const {id} = JSON.parse(response.body).data;

context.copyToClipboard(`https://giphy.com/gifs/${id}`);
context.notify('URL to the GIF has been copied to the clipboard');
};

const config = {
apiKey: {
title: 'API key',
type: 'string',
minLength: 13,
default: 'dc6zaTOxFJmzC', // Rate limited test key
required: true
}
};

const giphy = {
title: 'Share to GIPHY',
formats: ['gif'],
formats: [
'gif'
],
action,
config: {
apiKey: {
title: 'API key',
type: 'string',
minLength: 13,
default: 'dc6zaTOxFJmzC', // Rate limited test key
required: true
}
}
config
};

exports.shareServices = [giphy];
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"form-data": "^2.1.4"
},
"devDependencies": {
"ava": "^0.23.0",
"ava": "^2.3.0",
"kap-plugin-test": "^0.5.0",
"xo": "^0.18.2"
"xo": "^0.24.0"
}
}
7 changes: 1 addition & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@

## Install

In the `Kap` menu, go to `Preferences…`, select the `Plugins` pane, find this plugin, and click `Install`.
In the `Kap` menu, go to `Preferences…`, select the `Plugins` pane, find this plugin, and toggle it.


## Usage

In the editor, after recording, select `GIF`, and then `Share on GIPHY`.


## License

MIT © [Wulkano](https://wulkano.com)
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import test from 'ava';
import kapPluginTest from 'kap-plugin-test';

test(async t => {
test('main', async t => {
const plugin = kapPluginTest('unicorn.gif');

plugin.context.request.resolves({
Expand Down

0 comments on commit ea66cce

Please sign in to comment.