Comparing version 0.1.6 to 0.1.7
@@ -59,3 +59,3 @@ /* | ||
} | ||
}, // jshint | ||
}, // js-hint | ||
@@ -62,0 +62,0 @@ simplemocha: { |
@@ -12,2 +12,3 @@ var _ = require("underscore"); | ||
var markdown = require("node-markdown").Markdown; | ||
var colors = require("colors"); | ||
@@ -24,3 +25,3 @@ // Options | ||
simulate: false, | ||
template: path.join(__dirname, "../template/"), | ||
@@ -134,3 +135,3 @@ | ||
packageInfos.apidoc = json.apidoc || ""; | ||
if(json.apidocFilename) | ||
@@ -229,6 +230,6 @@ { | ||
if( ! options.simulate) wrench.mkdirSyncRecursive(options.dest); | ||
app.debug("copy template " + options.template + " to: " + options.dest); | ||
if( ! options.simulate) wrench.copyDirSyncRecursive(options.template, options.dest); | ||
// api_data | ||
@@ -238,6 +239,6 @@ var json = JSON.stringify(blocks, null, 2); | ||
if( ! options.simulate) fs.writeFile(options.dest + "./api_data.json", json); | ||
app.debug("write js file: " + options.dest + "api_data.js"); | ||
if( ! options.simulate) fs.writeFile(options.dest + "./api_data.js", "define({ api: " + json + " });"); | ||
// api_project | ||
@@ -247,3 +248,3 @@ var json = JSON.stringify(packageInfos, null, 2); | ||
if( ! options.simulate) fs.writeFile(options.dest + "./api_project.json", json); | ||
app.debug("write js file: " + options.dest + "api_project.js"); | ||
@@ -273,3 +274,3 @@ if( ! options.simulate) fs.writeFile(options.dest + "./api_project.js", "define(" + json + ");"); | ||
_.defaults(options.workers, app.workers); | ||
var files = findFiles(options); | ||
@@ -297,3 +298,3 @@ var parser = new Parser(app); | ||
} // for | ||
// Worker / Filter | ||
@@ -304,7 +305,6 @@ if(parsedFiles.length > 0) | ||
filter.process(parsedFiles, parsedFilenames); | ||
var packageInfos = getPackageData(); | ||
createOutputFiles(parsedFiles, parsedFilenames, packageInfos); | ||
return parsedFiles.length; | ||
@@ -311,0 +311,0 @@ } |
@@ -62,7 +62,7 @@ var fs = require("fs"); | ||
self.src = self.src.replace(/\r\n/g, "\n"); | ||
self.blocks = []; | ||
self.elements = []; | ||
self.indexApiBlocks = []; | ||
// Blöcke ermitteln | ||
@@ -132,3 +132,3 @@ self.blocks = self._findBlocks(); | ||
} | ||
if(self.parsers[element.name].preventGlobal && self.parsers[element.name].preventGlobal === true) | ||
@@ -158,3 +158,3 @@ { | ||
} | ||
if(preventGlobal === true) | ||
@@ -184,3 +184,3 @@ { | ||
} | ||
// Zusätzlich in Root einfügen | ||
@@ -258,3 +258,3 @@ if(self.parsers[element.name].extendRoot === true) | ||
var src = self.src; | ||
// Zeilenumbrüche durch Unicode ersetzen | ||
@@ -301,2 +301,6 @@ src = src.replace(/\n/g, "\uffff"); | ||
foundIndex = j; | ||
} | ||
if(elements[i][j].name.substr(0, 9) === "apiignore") | ||
{ | ||
foundIndex = -1; | ||
break; | ||
@@ -303,0 +307,0 @@ } |
@@ -8,3 +8,3 @@ function parse(content) | ||
content = content.replace(/\n/g, "\uffff"); | ||
// Search: type, field, defaultValue, optional, description | ||
@@ -11,0 +11,0 @@ // Example: {Boolean} [user.name="Default Value"] Users lastname. |
@@ -55,3 +55,3 @@ var _ = require("lodash"); // Because of _.merge | ||
} | ||
if( ! result[name]) result[name] = {}; | ||
@@ -58,0 +58,0 @@ result[name][version] = block["global"][defineName]; |
@@ -50,3 +50,3 @@ var _ = require("lodash"); // Because of _.merge | ||
var version = "0.0.0"; | ||
if(block.version) | ||
@@ -56,3 +56,3 @@ { | ||
} | ||
if( ! result[name]) result[name] = {}; | ||
@@ -59,0 +59,0 @@ result[name][version] = block.local; |
@@ -62,3 +62,3 @@ var util = require("util"); | ||
} // for | ||
// Workers postProcess | ||
@@ -65,0 +65,0 @@ for(var i = 0; i < self.workers.length; i += 1) |
{ | ||
"name": "apidoc", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "RESTful web API Documentation Generator", | ||
@@ -34,8 +34,8 @@ "author": "Peter Rottmann <rottmann@inveris.de>", | ||
"devDependencies": { | ||
"grunt": "~0.4.0rc7", | ||
"grunt-contrib-clean": "~0.4.0", | ||
"grunt-contrib-jshint": "~0.1.1rc6", | ||
"grunt-simple-mocha": "~0.3.2", | ||
"grunt": "~0.4.1", | ||
"grunt-contrib-clean": "~0.4.1", | ||
"grunt-contrib-jshint": "~0.4.3", | ||
"grunt-simple-mocha": "~0.4.0", | ||
"should": "~1.2.2" | ||
} | ||
} |
@@ -17,2 +17,4 @@ # apiDoc | ||
* `0.1.7` Add @apiIgnore. Update grunt Modules. | ||
* `0.1.6` Fix OSX executable | ||
* `0.1.5` Official release | ||
@@ -19,0 +21,0 @@ |
define({ | ||
"name": "apidoc", | ||
"version": "0.1.5", | ||
"version": "0.1.7", | ||
"description": "RESTful web API Documentation Generator", | ||
"apidoc": "", | ||
"generator": { | ||
"version": "0.1.5", | ||
"version": "0.1.7", | ||
"time": "2013-04-12T16:50:18.630Z" | ||
} | ||
}); |
{ | ||
"name": "apidoc", | ||
"version": "0.1.5", | ||
"version": "0.1.7", | ||
"description": "RESTful web API Documentation Generator", | ||
"apidoc": "", | ||
"generator": { | ||
"version": "0.1.5", | ||
"version": "0.1.7", | ||
"time": "2013-04-12T16:50:18.630Z" | ||
} | ||
} |
/** | ||
* @test Ignore this block. | ||
* @test Ignore this block. No apiDoc. | ||
*/ | ||
/** | ||
* @apiIgnore Ignore this block, apiIgnore is set. | ||
* @api {get} /ignore/me | ||
*/ | ||
/** | ||
* @api {get} /log/:id Get | ||
@@ -7,0 +12,0 @@ * @apiDescription Daten eines Logs laden. |
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
1065242
7315
24