Comparing version 0.0.8 to 0.0.9
@@ -18,7 +18,4 @@ #!/usr/bin/env node | ||
program.command('init-config') | ||
.option('-n, --name') | ||
.option('-v, --version') | ||
.option('-k, --key') | ||
.action(function(opts) { | ||
cliUtils.initConfig(opts); | ||
.action(function() { | ||
cliUtils.initConfig(); | ||
}) | ||
@@ -25,0 +22,0 @@ |
@@ -6,6 +6,6 @@ # 迭代开发 #1 :it-1708 | ||
- [x] 解析 doc | ||
- [ xx] 解析 js source | ||
- [ ] 解析 js source | ||
- [x] comment 抽除 | ||
- [ xx] comment 解析出 jsDef 规则 | ||
- [ x] js source => 文档数据 & paths | ||
- [ ] comment 解析出 jsDef 规则 | ||
- [ ] js source => 文档数据 & paths | ||
@@ -12,0 +12,0 @@ ## jsDef 文档 HTML 渲染 :task-render-html |
module.exports = { | ||
projectKey: ${key}, | ||
projectName: ${name}, | ||
version: ${version}, | ||
projectKey: 'myProject-1.0.0', | ||
projectName: 'myProject', | ||
version: '1.0.0', | ||
root: __dirname, | ||
@@ -6,0 +6,0 @@ doc: { |
module.exports = { | ||
projectKey: 'myproject-1.0.0', | ||
projectName: 'myproject', | ||
version: '1.0.0', | ||
projectKey: ${key}, | ||
projectName: ${name}, | ||
version: ${version}, | ||
root: __dirname, | ||
@@ -6,0 +6,0 @@ doc: { |
{ | ||
"name": "jsdef", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "A tool to parse documentation for javascript in a more straight-forward way", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -49,7 +49,4 @@ var cwd = process.cwd(); | ||
}, | ||
initConfig: function (opts) { | ||
initConfig: function () { | ||
var config = utils.readFile(etc.path('/examples/jsdef.config.js')); | ||
config.replace('${key}', opts.key || 'myproject-1.0.0'); | ||
config.replace('${name}', opts.name || 'myproject'); | ||
config.replace('${version}', opts.version || '1.0.0'); | ||
utils.writeFile(cwd + '/jsdef.config.js', config); | ||
@@ -107,3 +104,3 @@ }, | ||
console.log((name || 'server') + 'is up : http://localhost:' + port); | ||
console.log((name || 'server') + ' is up : http://localhost:' + port); | ||
}); | ||
@@ -110,0 +107,0 @@ } |
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
477060
3506