Permalink
Browse files

Changed path option to only be included when the user does not define…

… a dest. Closes #14
  • Loading branch information...
1 parent 597a5fe commit fafca91c11d19c3507f0b87ad11b7b51727129cd @JeffHerb JeffHerb committed Oct 30, 2013
Showing with 8 additions and 20 deletions.
  1. +0 −7 .directory
  2. +5 −2 README.md
  3. +1 −1 docs/examples.md
  4. +1 −1 docs/options.md
  5. +1 −1 package.json
  6. +0 −8 tasks/lib/utils.js
View
@@ -1,7 +0,0 @@
-[Dolphin]
-PreviewsShown=true
-Timestamp=2013,9,28,12,58,30
-Version=3
-
-[Settings]
-HiddenFilesShown=true
View
@@ -28,7 +28,7 @@ Options for this plugin are broken down into sub-option categories as defined be
### output
> Used to idenify where cache and downloaded request data should be stored by default
-* **path**: _default: 'api-data'_ - location where all data is collected when saved to disk, if no specific destination is definded under the targets dest.
+* **path**: _default: 'api-data'_ - special location where all data is collected when saved to disk, when no specific destination is definded under the targets `dest`.
* **cache**: _default: '.cache.json'_ - plugin cache file name. Will be stored under under the output path defined above.
#### format
@@ -132,6 +132,7 @@ github: {
'/repos/assemble/grunt-github-api/issues'
],
dest: 'combinded-issues.json'
+ // File created will be save along the gruntfile.
},
// Create two different files from two different repos.
@@ -146,6 +147,7 @@ github: {
'/repos/assemble/grunt-github-api-example/issues',
'/repos/assemble/grunt-github-api/issues'
]
+ // Files created will be saved inside the api-data folder
},
// Downloads a copy of the example.json file from GitHub.
@@ -156,6 +158,7 @@ github: {
}
},
src: '/repos/assemble/grunt-github-api-example/contents/example.json'
+ // File created will be saved inside the api-data folder
}
}
```
@@ -177,4 +180,4 @@ Released under the MIT license
***
-_This file was generated on Tue Oct 22 2013 21:23:00._
+_This file was generated on Tue Oct 29 2013 21:13:51._
View
@@ -51,7 +51,7 @@ github: {
}
},
src: '/repos/assemble/grunt-github-api-example/contents/example.json'
- // Files created will be saved inside the api-data folder
+ // File created will be saved inside the api-data folder
}
}
```
View
@@ -4,7 +4,7 @@ Options for this plugin are broken down into sub-option categories as defined be
## output
> Used to idenify where cache and downloaded request data should be stored by default
-* **path**: _default: 'api-data'_ - special location where all data is collected when saved to disk, when no specific destination is definded under the targets dest.
+* **path**: _default: 'api-data'_ - special location where all data is collected when saved to disk, when no specific destination is definded under the targets `dest`.
* **cache**: _default: '.cache.json'_ - plugin cache file name. Will be stored under under the output path defined above.
### format
View
@@ -1,7 +1,7 @@
{
"name": "grunt-github-api",
"description": "Query Github's API and save the returned JSON files locally.",
- "version": "0.2.2",
+ "version": "0.2.3",
"homepage": "https://github.com/assemble/grunt-github-api",
"author": {
"name": "Jeffrey Herb",
View
@@ -185,8 +185,6 @@ var github_api = function() {
// Parse the data into an object so it can be manipulated
var reqData = JSON.parse(data);
- //console.log(reqData);
-
// Check for an error response from the GitHub API.
if (reqData.message) {
@@ -210,8 +208,6 @@ var github_api = function() {
// Check to see if they multiple requests belong together
if (request[3].concat) {
- //console.log("concat");
-
// Requests are together, call nest request
nextRequest(requestQueue, collection, response);
@@ -256,12 +252,8 @@ var github_api = function() {
write: function(data, dest, type, format, cb) {
- //console.log(data.length);
-
var buffer;
- console.log(format);
-
if (type === "data") {
buffer = new Buffer(JSON.stringify(data, null, format.indent));
} else {

0 comments on commit fafca91

Please sign in to comment.