Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecating the standalone file and removing the readme entry #25

Merged
merged 1 commit into from
Mar 14, 2015
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
32 changes: 0 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ To install as an Ember CLI addon (v0.1.5 or greater):
ember install:addon ember-websockets
```

Or if you are using Ember CLI < 0.1.5:

```
npm install ember-websockets --save-dev
```

## Simple example of using it in your app

Import the socket mixin and add it to any route(s) that you wish
Expand Down Expand Up @@ -276,32 +270,6 @@ export default Ember.Route.extend(socketMixin, {
});
```

## Using ember-websockets with a non CLI Ember app

First get the assets:
```
npm install ember-websockets --save-dev
```

Second include the [standalone JS file](https://github.com/thoov/ember-websockets/blob/master/vendor/ember-websocket.js) inside of your HTML (located inside of the vendor folder):

After you get the assets include the dist file in your HTML file:
```html
<script src="js/libs/jquery.js"></script>
<script src="js/libs/handlebars.js"></script>
<script src="js/libs/ember.js"></script>
<script src="./path/to/vendor/ember-websockets.js"></script>
// Make sure that you include this below your ember.js include
```
This will add the mixin to a global variable called EmberWebsocket.

```js
App.IndexRoute = Ember.Route.extend(window.EmberWebsocket, {
socketURL: 'ws://localhost:8080'
});
```
**NOTE:** The standalone JS dist file used to be located inside of the dist folder but has moved to the vendor folder.

## Live Example

* `git clone git@github.com:thoov/ember-websockets.git`
Expand Down
3 changes: 3 additions & 0 deletions vendor/ember-websocket.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
(function() {

Ember.deprecate('This file has been deprecated and will be removed in the near future. Please visit: https://github.com/thoov/ember-websockets/issues/24 for more information.', true);

var typeOf = Ember.typeOf;
var isEmpty = Ember.isEmpty;
var socketEvents = ['onclose', 'onerror', 'onmessage', 'onopen'];
Expand Down