Skip to content
This repository was archived by the owner on Jun 11, 2023. It is now read-only.

Commit 51a0fc7

Browse files
committed
Bump version 0.10.0
1 parent cc983ef commit 51a0fc7

File tree

9 files changed

+107
-135
lines changed

9 files changed

+107
-135
lines changed

Diff for: .gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.settings/
2-
.project
31
node_modules/
4-
tmp/
2+
tmp/
3+
npm-debug.log
4+

Diff for: .npmignore

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
.settings/
2-
.project
1+
.git/
32
node_modules/
4-
tmp/
3+
test/
4+
tmp/
5+
.gitignore
6+
.npmignore
7+
.travis.yml
8+
npm-debug.log

Diff for: Gruntfile.js

+21-31
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,48 @@
1-
/*
2-
* grunt-apidoc
3-
* https://github.com/apidoc/grunt-apidoc
4-
* http://apidocjs.com
5-
*
6-
* Copyright (c) 2013 inveris OHG
7-
* Author Peter Rottmann <[email protected]>
8-
* Licensed under the MIT license.
9-
*/
10-
11-
"use strict";
1+
'use strict';
122

133
module.exports = function(grunt) {
144

155
grunt.initConfig({
166
jshint: {
177
all: [
18-
"Gruntfile.js",
19-
"tasks/**/*.js"
8+
'Gruntfile.js',
9+
'tasks/**/*.js'
2010
],
2111
options: {
22-
jshintrc: ".jshintrc"
12+
jshintrc: '.jshintrc'
2313
}
2414
},
2515

26-
// clear temporary dir.
16+
// clear temporary dir
2717
clean: {
28-
test: ["tmp"]
29-
}, // clean
18+
test: ['tmp']
19+
},
3020

31-
// apidoc configuration.
21+
// apidoc configuration
3222
apidoc: {
3323
test: {
34-
src: "test/fixtures",
35-
dest: "tmp/",
24+
src: 'test/fixtures',
25+
dest: 'tmp/',
3626
options: {
3727
debug: true,
38-
includeFilters: [ ".*\\.js$" ]
28+
includeFilters: [ '.*\\.js$' ]
3929
}
4030
}
41-
} // apidoc
31+
}
4232

43-
}); // grunt.initConfig
33+
});
4434

45-
// Load plugins tasks.
46-
grunt.loadTasks("tasks");
35+
// load plugins tasks
36+
grunt.loadTasks('tasks');
4737

48-
// Tasks.
49-
grunt.loadNpmTasks("grunt-contrib-jshint");
50-
grunt.loadNpmTasks("grunt-contrib-clean");
38+
// Tasks
39+
grunt.loadNpmTasks('grunt-contrib-jshint');
40+
grunt.loadNpmTasks('grunt-contrib-clean');
5141

5242
// Tasks: Default
53-
grunt.registerTask('default', ["jshint"]);
43+
grunt.registerTask('default', ['jshint']);
5444

5545
// Tasks: Test
56-
grunt.registerTask('test', ["clean", "apidoc"]);
46+
grunt.registerTask('test', ['clean', 'apidoc']);
5747

58-
}; // module.exports
48+
};

Diff for: LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2013-2014 inveris OHG
2+
Author Peter Rottmann <[email protected]>
3+
Licensed under the MIT license.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

Diff for: LICENSE.md

-22
This file was deleted.

Diff for: README.md

+6-9
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22

33
[![Build Status](https://travis-ci.org/apidoc/grunt-apidoc.svg?branch=master)](https://travis-ci.org/apidoc/grunt-apidoc)
44

5+
56
## About
67
Generates a RESTful API Documentation with [apiDoc](http://apidocjs.com).
78

89
Generated example documentation at [http://apidocjs.com/example/](http://apidocjs.com/example/)
910

11+
1012
## Installation
1113
1. `npm install grunt-apidoc --save-dev`
1214
2. Add `grunt.loadNpmTasks('grunt-apidoc');` to `Gruntfile.js`
1315

16+
1417
## Configuration
1518

1619
Add the task to your Gruntfile's **grunt.initConfig**:
@@ -25,6 +28,7 @@ apidoc: {
2528

2629
Use only one src and one dest, apiDoc search in subdirs for files with apidoc-parameters.
2730

31+
2832
### Additional options
2933

3034
All `apiDoc` options can be used within options-block, see [apiDoc configure](http://apidocjs.com/#configure) for details.
@@ -64,8 +68,10 @@ apidoc: {
6468
}
6569
```
6670

71+
6772
## Changelog
6873

74+
* `0.10.0` Upgrade to use always the latest version of apiDoc.
6975
* `0.9.0` Upgrade to apiDoc 0.9.x.
7076
* `0.8.0` Upgrade to apiDoc 0.8.x.
7177
* `0.7.0` Upgrade to apiDoc 0.7.x.
@@ -83,12 +89,3 @@ apidoc: {
8389
## Help
8490

8591
Please visit the main [apiDoc project page on github](https://github.com/apidoc/apidoc) for help and information.
86-
87-
88-
## License
89-
90-
Copyright (c) 2013-2014 inveris OHG
91-
92-
Author Peter Rottmann <[email protected]>
93-
94-
Licensed under the MIT license.

Diff for: bin/grunt-apidoc

+14-25
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,29 @@
11
#!/usr/bin/env node
22

3-
"use strict";
3+
'use strict';
44

5-
/*
6-
* grunt-apidoc
7-
* https://github.com/apidoc/grunt-apidoc
8-
* http://apidocjs.com
9-
*
10-
* Copyright (c) 2013 inveris OHG
11-
* Author Peter Rottmann <[email protected]>
12-
* Licensed under the MIT license.
13-
*/
5+
// modules
6+
var path = require('path');
7+
var grunt = require('grunt');
148

15-
// Modules.
16-
var path = require("path");
17-
var grunt = require("grunt");
9+
var basePath = path.resolve.bind(null, __dirname, '..');
1810

19-
var basePath = path.resolve.bind(null, __dirname, "..");
11+
var pkg = require(basePath('package.json'));
2012

21-
var pkg = require(basePath("package.json"));
13+
grunt.task.loadTasks(basePath('tasks'));
2214

23-
grunt.task.loadTasks(basePath("tasks"));
24-
25-
// Help.
15+
// help
2616
grunt.help.queue = [
27-
"content"
17+
'content'
2818
];
2919

3020
grunt.help.content = function() {
31-
grunt.log.writeln("grunt-init: Create RESTful API Documentation with apidoc. (v" + pkg.version + ")");
21+
grunt.log.writeln('grunt-init: Create RESTful API Documentation with apidoc. (v' + pkg.version + ')');
3222
};
3323

34-
// Version.
24+
// version
3525
if(grunt.cli.options.version)
36-
console.log("grunt-init v" + pkg.version);
37-
}
26+
console.log('grunt-init v' + pkg.version);
3827

39-
// Execute.
40-
grunt.cli();
28+
// execute
29+
grunt.cli();

Diff for: package.json

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
{
22
"name": "grunt-apidoc",
3-
"version": "0.9.0",
3+
"version": "0.10.0",
44
"description": "Grunt task to generate a RESTful API Documentation with apidoc",
55
"author": "Peter Rottmann <[email protected]>",
6-
"license": "MIT",
6+
"license": {
7+
"type": "MIT",
8+
"url": "https://github.com/apidoc/grunt-apidoc/blob/master/LICENSE"
9+
},
10+
"bin": "bin/grunt-apidoc",
11+
"main": "Gruntfile.js",
12+
"homepage": "http://apidocjs.com",
713
"repository": {
814
"type": "git",
915
"url": "https://github.com/apidoc/grunt-apidoc.git"
1016
},
11-
"main": "Gruntfile.js",
12-
"bin": "bin/grunt-apidoc",
1317
"scripts": {
1418
"test": "grunt test"
1519
},
@@ -25,16 +29,16 @@
2529
"restful"
2630
],
2731
"engines": {
28-
"node": ">= 0.8.0"
32+
"node": ">= 0.10.0"
2933
},
3034
"dependencies": {
31-
"apidoc": "~0.9.0"
35+
"apidoc": "*"
3236
},
3337
"devDependencies": {
3438
"grunt-contrib-clean": "~0.6.0",
3539
"grunt-contrib-jshint": "~0.10.0"
3640
},
3741
"peerDependencies": {
38-
"grunt": "~0.4.5"
42+
"grunt": "~0.4.0"
3943
}
4044
}

Diff for: tasks/apidoc.js

+23-35
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,31 @@
1-
/*
2-
* grunt-apidoc
3-
* https://github.com/apidoc/grunt-apidoc
4-
* http://apidocjs.com
5-
*
6-
* Copyright (c) 2013 inveris OHG
7-
* Author Peter Rottmann <[email protected]>
8-
* Licensed under the MIT license.
9-
*/
10-
111
module.exports = function(grunt) {
122

13-
// Modules.
14-
var apidoc = require("apidoc");
3+
// modules
4+
var apidoc = require('apidoc');
155

16-
// Task.
17-
grunt.registerMultiTask("apidoc", "Create REST-API-Documentation with apidoc", function() {
18-
var config = this.data;
19-
var options = config.options || {};
6+
// task
7+
grunt.registerMultiTask('apidoc', 'Create REST-API-Documentation with apidoc', function() {
8+
var config = this.data;
9+
var options = config.options || {};
2010

21-
grunt.log.subhead("grunt-apidoc");
11+
grunt.log.subhead('grunt-apidoc');
2212

23-
// Options.
24-
options.src = config.src || config.i || options.i;
25-
options.dest = config.dest || config.o || options.o;
26-
options.template = config.template || config.t || options.t;
13+
// options
14+
options.src = config.src || config.i || options.i;
15+
options.dest = config.dest || config.o || options.o;
16+
options.template = config.template || config.t || options.t;
2717

28-
// Execute.
29-
var result = apidoc(options);
18+
// execute
19+
var result = apidoc.createDoc(options);
3020

31-
if(result === true || result === 0)
32-
{
33-
grunt.log.ok("grunt-apidoc finished.");
34-
return true;
35-
}
36-
else
37-
{
38-
grunt.log.error("grunt-apidoc error: Execution terminated (set \"options { debug: true }\" in Gruntfile.js for details.");
39-
return false;
40-
}
41-
}); // registerMultiTask
21+
if (result === false) {
22+
grunt.log.error('grunt-apidoc error: Execution terminated (set \'options: { debug: true }\' in Gruntfile.js for details.');
23+
return false;
24+
}
25+
else {
26+
grunt.log.ok('grunt-apidoc finished.');
27+
return true;
28+
}
29+
});
4230

43-
}; // module.exports
31+
};

0 commit comments

Comments
 (0)