Skip to content

Commit

Permalink
Change writeFiel to writeFileSync. Problem with grunt-apidoc under
Browse files Browse the repository at this point in the history
linux.
  • Loading branch information
rottmann committed Dec 23, 2013
1 parent 0b5d254 commit 985a399
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/apidoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,18 +251,18 @@ function createOutputFiles(parsedFiles, parsedFilenames, packageInfos)
// api_data
var json = JSON.stringify(blocks, null, 2);
app.debug("write json file: " + options.dest + "api_data.json");
if( ! options.simulate) fs.writeFile(options.dest + "./api_data.json", json);
if( ! options.simulate) fs.writeFileSync(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 + " });");
if( ! options.simulate) fs.writeFileSync(options.dest + "./api_data.js", "define({ api: " + json + " });");

// api_project
var json = JSON.stringify(packageInfos, null, 2);
app.debug("write json file: " + options.dest + "api_project.json");
if( ! options.simulate) fs.writeFile(options.dest + "./api_project.json", json);
if( ! options.simulate) fs.writeFileSync(options.dest + "./api_project.json", json);

app.debug("write js file: " + options.dest + "api_project.js");
if( ! options.simulate) fs.writeFile(options.dest + "./api_project.js", "define(" + json + ");");
if( ! options.simulate) fs.writeFileSync(options.dest + "./api_project.js", "define(" + json + ");");
} // createOutputFiles

/**
Expand Down

0 comments on commit 985a399

Please sign in to comment.