Skip to content

Commit

Permalink
[fix] fs.existsSync was moved to fs.existsSync
Browse files Browse the repository at this point in the history
  • Loading branch information
jfhbrook committed Jul 7, 2012
1 parent 6a88546 commit 33a2506
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/article.js
Expand Up @@ -53,7 +53,7 @@ Article.create = function(dir) {
article,
config;

if (path.existsSync(json) && path.existsSync(md)) {
if (fs.existsSync(json) && fs.existsSync(md)) {
//clone to avoid altering same instance
config = util.clone(require(json));

Expand Down
2 changes: 1 addition & 1 deletion lib/commands/create.js
Expand Up @@ -82,7 +82,7 @@ cmd.lib = {
);

this.log('creating blog directory: ' + this.blogDir);
if(path.existsSync(this.blogDir)) wrench.rmdirSyncRecursive(this.blogDir);
if(fs.existsSync(this.blogDir)) wrench.rmdirSyncRecursive(this.blogDir);
fs.mkdirSync(this.blogDir);

this.createArticlesDirectory();
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/handler.js
Expand Up @@ -18,7 +18,7 @@ module.exports = {
var html = this.renderTemplate(template, data),
destDir = '/'+(dest.split('/').slice(1, -1).join('/'));

if(!path.existsSync(destDir)) {
if(!fs.existsSync(destDir)) {
wrench.mkdirSyncRecursive(destDir);
}
fs.writeFileSync(dest, html);
Expand Down

0 comments on commit 33a2506

Please sign in to comment.