grunt-mock2easy
Advanced tools
Comparing version 0.1.18 to 0.1.20
{ | ||
"name": "grunt-mock2easy", | ||
"description": "mock接口,生成md文档", | ||
"version": "0.1.18", | ||
"version": "0.1.20", | ||
"homepage": "", | ||
@@ -51,4 +51,5 @@ "author": { | ||
"node.extend":"~1.0.10", | ||
"node-promise":"~0.5.10" | ||
"node-promise":"~0.5.10", | ||
"async": "~0.9.0" | ||
} | ||
} |
@@ -32,3 +32,4 @@ # grunt-mock2easy | ||
database:'database', | ||
doc:'doc' | ||
doc:'doc', | ||
keepAlive:false | ||
} | ||
@@ -43,3 +44,3 @@ } | ||
#### options.port | ||
Type: `String` | ||
Type: `Number` | ||
Default value: 3100 | ||
@@ -61,2 +62,10 @@ | ||
#### options.keepAlive | ||
Type: `Boolean` | ||
Default value: false | ||
默认为false,false时可以独立起一个服务提供接口,true时可以和别的grunt服务组合成为一个任务串 | ||
## 和 grunt-contrib-connect 实现ajax请求跨域 | ||
@@ -86,3 +95,3 @@ | ||
## Release History | ||
@@ -14,2 +14,3 @@ /* | ||
var path = require('path'); | ||
var async = require('async'); | ||
@@ -25,3 +26,3 @@ | ||
if (!servers[this.target]) { | ||
servers[this.target] = require('./web/server')(grunt, this.target); | ||
servers[this.target] = require('./web/server')(grunt, this.target,this.async()); | ||
} | ||
@@ -34,3 +35,4 @@ | ||
database:'mock2easy', | ||
doc:'doc' | ||
doc:'doc', | ||
keepAlive:true | ||
}); | ||
@@ -37,0 +39,0 @@ |
'use strict'; | ||
module.exports = function(grunt, target) { | ||
module.exports = function(grunt, target,async) { | ||
@@ -94,2 +94,5 @@ var app = require('./app')(grunt); | ||
grunt.log.write('Mock服务已经启动,请访问地址:http://localhost:' + server.address().port); | ||
if(!options.keepAlive){ | ||
async(); | ||
} | ||
}); | ||
@@ -96,0 +99,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1617843
41173
94
12
+ Addedasync@~0.9.0
+ Addedasync@0.9.2(transitive)