Permalink
Browse files

Bump version 0.10.0

  • Loading branch information...
1 parent cc983ef commit 51a0fc76f4e768595167124ba096b9ff93db1be6 @rottmann rottmann committed Dec 18, 2014
Showing with 107 additions and 135 deletions.
  1. +3 −3 .gitignore
  2. +7 −3 .npmignore
  3. +21 −31 Gruntfile.js
  4. +22 −0 LICENSE
  5. +0 −22 LICENSE.md
  6. +6 −9 README.md
  7. +14 −25 bin/grunt-apidoc
  8. +11 −7 package.json
  9. +23 −35 tasks/apidoc.js
View
@@ -1,4 +1,4 @@
-.settings/
-.project
node_modules/
-tmp/
+tmp/
+npm-debug.log
+
View
@@ -1,4 +1,8 @@
-.settings/
-.project
+.git/
node_modules/
-tmp/
+test/
+tmp/
+.gitignore
+.npmignore
+.travis.yml
+npm-debug.log
View
@@ -1,58 +1,48 @@
-/*
- * grunt-apidoc
- * https://github.com/apidoc/grunt-apidoc
- * http://apidocjs.com
- *
- * Copyright (c) 2013 inveris OHG
- * Author Peter Rottmann <rottmann@inveris.de>
- * Licensed under the MIT license.
- */
-
-"use strict";
+'use strict';
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
all: [
- "Gruntfile.js",
- "tasks/**/*.js"
+ 'Gruntfile.js',
+ 'tasks/**/*.js'
],
options: {
- jshintrc: ".jshintrc"
+ jshintrc: '.jshintrc'
}
},
- // clear temporary dir.
+ // clear temporary dir
clean: {
- test: ["tmp"]
- }, // clean
+ test: ['tmp']
+ },
- // apidoc configuration.
+ // apidoc configuration
apidoc: {
test: {
- src: "test/fixtures",
- dest: "tmp/",
+ src: 'test/fixtures',
+ dest: 'tmp/',
options: {
debug: true,
- includeFilters: [ ".*\\.js$" ]
+ includeFilters: [ '.*\\.js$' ]
}
}
- } // apidoc
+ }
- }); // grunt.initConfig
+ });
- // Load plugins tasks.
- grunt.loadTasks("tasks");
+ // load plugins tasks
+ grunt.loadTasks('tasks');
- // Tasks.
- grunt.loadNpmTasks("grunt-contrib-jshint");
- grunt.loadNpmTasks("grunt-contrib-clean");
+ // Tasks
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-clean');
// Tasks: Default
- grunt.registerTask('default', ["jshint"]);
+ grunt.registerTask('default', ['jshint']);
// Tasks: Test
- grunt.registerTask('test', ["clean", "apidoc"]);
+ grunt.registerTask('test', ['clean', 'apidoc']);
-}; // module.exports
+};
View
@@ -0,0 +1,22 @@
+Copyright (c) 2013-2014 inveris OHG
+Author Peter Rottmann <rottmann@inveris.de>
+Licensed under the MIT license.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
View
@@ -1,22 +0,0 @@
-Copyright (c) 2013-2014 inveris OHG
-Author Peter Rottmann <rottmann@inveris.de>
-Licensed under the MIT license.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -2,15 +2,18 @@
[![Build Status](https://travis-ci.org/apidoc/grunt-apidoc.svg?branch=master)](https://travis-ci.org/apidoc/grunt-apidoc)
+
## About
Generates a RESTful API Documentation with [apiDoc](http://apidocjs.com).
Generated example documentation at [http://apidocjs.com/example/](http://apidocjs.com/example/)
+
## Installation
1. `npm install grunt-apidoc --save-dev`
2. Add `grunt.loadNpmTasks('grunt-apidoc');` to `Gruntfile.js`
+
## Configuration
Add the task to your Gruntfile's **grunt.initConfig**:
@@ -25,6 +28,7 @@ apidoc: {
Use only one src and one dest, apiDoc search in subdirs for files with apidoc-parameters.
+
### Additional options
All `apiDoc` options can be used within options-block, see [apiDoc configure](http://apidocjs.com/#configure) for details.
@@ -64,8 +68,10 @@ apidoc: {
}
```
+
## Changelog
+* `0.10.0` Upgrade to use always the latest version of apiDoc.
* `0.9.0` Upgrade to apiDoc 0.9.x.
* `0.8.0` Upgrade to apiDoc 0.8.x.
* `0.7.0` Upgrade to apiDoc 0.7.x.
@@ -83,12 +89,3 @@ apidoc: {
## Help
Please visit the main [apiDoc project page on github](https://github.com/apidoc/apidoc) for help and information.
-
-
-## License
-
-Copyright (c) 2013-2014 inveris OHG
-
-Author Peter Rottmann <rottmann@inveris.de>
-
-Licensed under the MIT license.
View
@@ -1,40 +1,29 @@
#!/usr/bin/env node
-"use strict";
+'use strict';
-/*
- * grunt-apidoc
- * https://github.com/apidoc/grunt-apidoc
- * http://apidocjs.com
- *
- * Copyright (c) 2013 inveris OHG
- * Author Peter Rottmann <rottmann@inveris.de>
- * Licensed under the MIT license.
- */
+// modules
+var path = require('path');
+var grunt = require('grunt');
-// Modules.
-var path = require("path");
-var grunt = require("grunt");
+var basePath = path.resolve.bind(null, __dirname, '..');
-var basePath = path.resolve.bind(null, __dirname, "..");
+var pkg = require(basePath('package.json'));
-var pkg = require(basePath("package.json"));
+grunt.task.loadTasks(basePath('tasks'));
-grunt.task.loadTasks(basePath("tasks"));
-
-// Help.
+// help
grunt.help.queue = [
- "content"
+ 'content'
];
grunt.help.content = function() {
- grunt.log.writeln("grunt-init: Create RESTful API Documentation with apidoc. (v" + pkg.version + ")");
+ grunt.log.writeln('grunt-init: Create RESTful API Documentation with apidoc. (v' + pkg.version + ')');
};
-// Version.
+// version
if(grunt.cli.options.version)
- console.log("grunt-init v" + pkg.version);
-}
+ console.log('grunt-init v' + pkg.version);
-// Execute.
-grunt.cli();
+// execute
+grunt.cli();
View
@@ -1,15 +1,19 @@
{
"name": "grunt-apidoc",
- "version": "0.9.0",
+ "version": "0.10.0",
"description": "Grunt task to generate a RESTful API Documentation with apidoc",
"author": "Peter Rottmann <rottmann@inveris.de>",
- "license": "MIT",
+ "license": {
+ "type": "MIT",
+ "url": "https://github.com/apidoc/grunt-apidoc/blob/master/LICENSE"
+ },
+ "bin": "bin/grunt-apidoc",
+ "main": "Gruntfile.js",
+ "homepage": "http://apidocjs.com",
"repository": {
"type": "git",
"url": "https://github.com/apidoc/grunt-apidoc.git"
},
- "main": "Gruntfile.js",
- "bin": "bin/grunt-apidoc",
"scripts": {
"test": "grunt test"
},
@@ -25,16 +29,16 @@
"restful"
],
"engines": {
- "node": ">= 0.8.0"
+ "node": ">= 0.10.0"
},
"dependencies": {
- "apidoc": "~0.9.0"
+ "apidoc": "*"
},
"devDependencies": {
"grunt-contrib-clean": "~0.6.0",
"grunt-contrib-jshint": "~0.10.0"
},
"peerDependencies": {
- "grunt": "~0.4.5"
+ "grunt": "~0.4.0"
}
}
View
@@ -1,43 +1,31 @@
-/*
- * grunt-apidoc
- * https://github.com/apidoc/grunt-apidoc
- * http://apidocjs.com
- *
- * Copyright (c) 2013 inveris OHG
- * Author Peter Rottmann <rottmann@inveris.de>
- * Licensed under the MIT license.
- */
-
module.exports = function(grunt) {
- // Modules.
- var apidoc = require("apidoc");
+ // modules
+ var apidoc = require('apidoc');
- // Task.
- grunt.registerMultiTask("apidoc", "Create REST-API-Documentation with apidoc", function() {
- var config = this.data;
- var options = config.options || {};
+ // task
+ grunt.registerMultiTask('apidoc', 'Create REST-API-Documentation with apidoc', function() {
+ var config = this.data;
+ var options = config.options || {};
- grunt.log.subhead("grunt-apidoc");
+ grunt.log.subhead('grunt-apidoc');
- // Options.
- options.src = config.src || config.i || options.i;
- options.dest = config.dest || config.o || options.o;
- options.template = config.template || config.t || options.t;
+ // options
+ options.src = config.src || config.i || options.i;
+ options.dest = config.dest || config.o || options.o;
+ options.template = config.template || config.t || options.t;
- // Execute.
- var result = apidoc(options);
+ // execute
+ var result = apidoc.createDoc(options);
- if(result === true || result === 0)
- {
- grunt.log.ok("grunt-apidoc finished.");
- return true;
- }
- else
- {
- grunt.log.error("grunt-apidoc error: Execution terminated (set \"options { debug: true }\" in Gruntfile.js for details.");
- return false;
- }
- }); // registerMultiTask
+ if (result === false) {
+ grunt.log.error('grunt-apidoc error: Execution terminated (set \'options: { debug: true }\' in Gruntfile.js for details.');
+ return false;
+ }
+ else {
+ grunt.log.ok('grunt-apidoc finished.');
+ return true;
+ }
+ });
-}; // module.exports
+};

0 comments on commit 51a0fc7

Please sign in to comment.