Skip to content

Commit

Permalink
make exports sane
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Nov 19, 2016
1 parent d623163 commit 5462bb2
Show file tree
Hide file tree
Showing 5 changed files with 41,037 additions and 3 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Discord RPC Client ##

[![npm](https://img.shields.io/npm/v/discord-rpc.svg?maxAge=3600)](https://www.npmjs.com/package/discord-rpc)
[![npm](https://img.shields.io/npm/dt/discord-rpc.svg?maxAge=3600)](https://www.npmjs.com/package/discord-rpc)
[![David](https://david-dm.org/guscaplan/discord-rpc.svg)](https://david-dm.org/guscaplan/discord-rpc)

[![NPM](https://nodei.co/npm/discord-rpc.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/discord-rpc/)

A simple RPC client for Discord somewhat stolen from the Discord StreamKit.

For the latest changes install via `guscaplan/discord-rpc`
Expand All @@ -12,7 +18,7 @@ Webpack builds of the beautiful and ugly kind are in `/webpack`
// NODE
const RPCClient = require('discord-rpc').Client;
// BROWSER
const RPCClient = window.RPCClient.Client;
const RPCClient = window.DiscordRPC.Client;

const client = new RPCClient({
OAUTH2_CLIENT_ID: 'xyzxyzxyz'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discord-rpc",
"version": "1.1.0",
"version": "1.1.1",
"description": "",
"main": "src/index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ module.exports = {
Constants: require('./Constants')
}

if (typeof window !== 'undefined') window.RPCClient = module.exports;
if (typeof window !== 'undefined') window.DiscordRPC = module.exports;
Loading

0 comments on commit 5462bb2

Please sign in to comment.