live-dev-server
Advanced tools
Comparing version 0.10.0 to 0.11.0
@@ -21,2 +21,3 @@ const path = require('path') | ||
before: function () {}, | ||
after: function () {}, | ||
workspace: defaultWorkspace, | ||
@@ -23,0 +24,0 @@ root: defaultWorkspace, |
@@ -7,3 +7,2 @@ const http = require('http') | ||
const parseUrl = require('parseurl') | ||
const bodyParser = require('body-parser') | ||
const send = require('send') | ||
@@ -51,4 +50,2 @@ const WebSocket = require('ws') | ||
app.use(bodyParser.urlencoded({ extended: false })) | ||
// 处理自定义inject片段 | ||
@@ -59,3 +56,3 @@ assertFunc(options, 'inject', function () { | ||
// 处理before钩子 | ||
// before | ||
assertFunc(options, 'before', function () { | ||
@@ -118,2 +115,7 @@ options.before(app) | ||
// after | ||
assertFunc(options, 'after', function () { | ||
options.after(app) | ||
}) | ||
wsIns.on('connection', function connection(ws) { | ||
@@ -120,0 +122,0 @@ ws.on('message', function incoming(message) { |
{ | ||
"name": "live-dev-server", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "develop env, watch files change", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -28,3 +28,3 @@ # live-dev-server | ||
1. incoming option | ||
2. `lds.config.js` | ||
2. `lds.config.js` or `live.config.js` | ||
3. default option | ||
@@ -58,3 +58,3 @@ | ||
project dir create a configuration file: `lds.config.js`.such as: | ||
project dir create a configuration file: `lds.config.js/live.config.js`.such as: | ||
@@ -110,3 +110,3 @@ ```js | ||
``` | ||
when config watcher, In the `inject` code, you will receive `wacher-[name]`, and `isDir` can be used to determine whether it is a folder. | ||
when config watcher, In the `inject` code, you will receive `watcher-[name]`, and `isDir` can be used to determine whether it is a folder. | ||
@@ -113,0 +113,0 @@ ```bash |
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
15186
380