crabatool 1.0.361 → 1.0.364

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/server.js +7 -2
  2. package/package.json +1 -1
package/lib/server.js CHANGED
@@ -11,11 +11,12 @@ exports = module.exports;
11
11
  // 每次都重启server
12
12
  var aloneServer;
13
13
  exports.run = function(options) {
14
+ var that = this;
14
15
  if (aloneServer) {
15
16
  aloneServer.close(() => {
16
17
  console.log('关闭旧实例...');
17
18
 
18
- this.start(options);
19
+ that.start(options);
19
20
  });
20
21
  } else {
21
22
  this.start(options);
@@ -142,7 +143,11 @@ function createServer(app, options) {
142
143
  }
143
144
 
144
145
  utils.log(`Server running at ${url}`);
145
- if (!options && !options.noOpen && !config.noOpen) {
146
+ var noOpen = config.noOpen;
147
+ if (options) {
148
+ noOpen = options.noOpen;
149
+ }
150
+ if (!noOpen) {
146
151
  utils.openProcess(url);
147
152
  }
148
153
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crabatool",
3
- "version": "1.0.361",
3
+ "version": "1.0.364",
4
4
  "description": "crabatool",
5
5
  "main": "index.js",
6
6
  "bin": {