node-bigpipe
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"name": "node-bigpipe", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "bigpipe for nodejs,express,sails,thinkjs,node-web,modular bigpipe for node", | ||
@@ -5,0 +5,0 @@ "main": "back-end/Bigpipe.es5.js", |
@@ -12,3 +12,3 @@ # node-bigpipe | ||
- Backend in ES6: `import {Bigpipe} from 'node-bigpipe'` or `import {Bigpipe} from './back-end/Bigpipe'` | ||
- Backend in ES5: `var Bigpipe = require('node-bigpipe').Bigpipe` or `var Bigpipe = require('./back-end/Bigpipe.es5')` | ||
- Backend in ES5: `var Bigpipe = require('node-bigpipe').Bigpipe` or `var Bigpipe = require('./back-end/Bigpipe.es5').Bigpipe` | ||
- Front-End: use the `jQuery` and `mo.bigpipe.es5.js` files in your html | ||
@@ -21,2 +21,4 @@ - Also you can wrap the front-end js by yourself, remember matching the `Bigpipe` API of Backend | ||
* In Backend you should create a pipe block and return a promise | ||
* require the `node-bigpipe` module by `var Bigpipe = require('node-bigpipe').Bigpipe` | ||
* Create an Bigpipe by `var bigpipe = new Bigpipe('pipeName', req, res)` | ||
* Use `start` api to ouput the pipe and render the unclosed base html frame | ||
@@ -48,3 +50,3 @@ * Use `pipe` api to transport to browser the array composed by pipe blocks you created | ||
````Javascript | ||
```Javascript | ||
function tagPipe(bp){ | ||
@@ -77,3 +79,3 @@ return new Promise((resolve, reject)=>{ | ||
````Javascript | ||
```Javascript | ||
@@ -103,3 +105,3 @@ index (req, res, next, page=1){ | ||
````Html | ||
```Html | ||
<script type="text/javascript"> | ||
@@ -118,3 +120,3 @@ | ||
````Javascript | ||
```Javascript | ||
@@ -179,3 +181,3 @@ function tagPipe(bp){ | ||
- Full front end code | ||
````HTML | ||
```HTML | ||
<script type="text/javascript" src="/static/jquery.min.js"></script> | ||
@@ -208,3 +210,3 @@ <script type="text/javascript" src="/static/mo.bigpipe.es5.js"></script> | ||
````Javascript | ||
```Javascript | ||
@@ -211,0 +213,0 @@ export default class extends Base { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112401
239