This repository has been archived by the owner on Sep 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3e88e0
commit ae2e261
Showing
1 changed file
with
1 addition
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1 @@ | ||
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gitterHQ/sidecar?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Sidecar on npm](https://img.shields.io/npm/v/gitter-sidecar.svg)](https://www.npmjs.com/gitter-sidecar) | ||
|
||
# Sidecar | ||
|
||
Gitter embed widget, [sidecar.gitter.im](https://sidecar.gitter.im/) | ||
|
||
### [Changelog](https://github.com/gitterHQ/sidecar/blob/master/CHANGELOG.md) | ||
|
||
|
||
# Usage | ||
|
||
```html | ||
<script> | ||
((window.gitter = {}).chat = {}).options = { | ||
room: 'gitterHQ/sidecar-demo' | ||
}; | ||
</script> | ||
<script src="sidecar.js"></script> | ||
``` | ||
|
||
## Module Usage | ||
|
||
There is also a standalone package available on npm [`gitter-sidecar`](https://www.npmjs.com/gitter-sidecar) that doesn't pollute the global scope. | ||
|
||
```js | ||
var Sidecar = require('gitter-sidecar'); | ||
|
||
var myChat = new Sidecar({ | ||
room: 'gitterHQ/sidecar-demo' | ||
}); | ||
``` | ||
|
||
# [API](https://github.com/gitterHQ/sidecar/blob/master/API.md) | ||
|
||
|
||
|
||
# Build | ||
|
||
- Build the Sidecar library: `npm run build`, output: `./dist/sidecar.js` | ||
- Build Sidecar module/package: `npm run build-module`, output: `./dist/sidecar-module.js` | ||
|
||
### Dev | ||
|
||
Same as `devbuild` but also watches the directory and rebuilds on any file changes | ||
|
||
`npm run devbuild` | ||
|
||
|
||
# Build Microsite | ||
|
||
`npm run build-microsite` | ||
|
||
### Dev | ||
|
||
This is currently a work in progress. But I hope to have `react-hot-loader` and `webpack-dev-server` working for this: | ||
|
||
`npm run devbuild-microsite` | ||
|
||
|
||
# Deploy: Push Release | ||
|
||
We have CircleCI setup, the config is in `circle.yml`. | ||
|
||
To push a new version of the sidecar script, run the following: | ||
|
||
- `npm version patch`: bump version and tag it | ||
- `git push --tags`: Trigger CircleCI build | ||
|
||
To push a new release of microsite, just push to the `master` branch | ||
|
||
|
||
## Manual Deployment | ||
|
||
You'll need AWS credentials exported as `AWS_KEY` and `AWS_SECRET`. This command is not meant to be run locally, only by the CircleCI deployment step (on every tag). | ||
|
||
`npm run deploy` | ||
|
||
|
||
|
||
# Testing | ||
|
||
You'll need a BrowserStack username and key, exported as `BS_USER` and `BS_KEY` respectively. | ||
|
||
`npm test` | ||
Project moved to https://gitlab.com/gitlab-org/gitter/sidecar |