Skip to content

Commit d74e058

Browse files
committed
Merge pull request #20 from vitkarpov/fix-17
Use external pubsub module
2 parents 2c04f0a + 144a7e6 commit d74e058

File tree

7 files changed

+296
-288
lines changed

7 files changed

+296
-288
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
dist
33
.idea
4+
jblocks.js

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
language: node_js
2+
before_script: npm run-script build
23
node_js:
34
- 0.10
45
notifications:

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,31 @@ counter.getCurrentValue();
113113
counter.destroy();
114114
```
115115

116-
## How do I start?
116+
## Usage
117117

118+
### CDN
118119

119120
Include the library:
120121

121122
```html
122-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jblocks/1.0.6/index.min.js"></script>
123+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jblocks/1.1.0/jblocks.js"></script>
123124
```
124125

125-
`jBlocks` namespace is now in global scope. If you need commonjs support, let me know.
126+
`jBlocks` namespace is now in global scope.
127+
128+
### Commonjs
129+
130+
First of all, get the package using npm:
131+
132+
```
133+
npm install jblocks
134+
```
135+
136+
After the package ends up in you `node_modules`:
137+
138+
```js
139+
var jblocks = require('jblocks');
140+
```
126141

127142
You can use the **[full API Doc generated from source](http://vitkarpov.com/jblocks)**.
128143

index.browser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
global.jBlocks = require('./lib/index.js');

0 commit comments

Comments
 (0)