Skip to content

Commit

Permalink
Added logging closes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
f0rmat1k committed Mar 24, 2015
1 parent ba1503d commit 21cd63a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions bemy.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ function rename(nodePath, originNode){

fs.writeFileSync(newChildPath, file);
}

if (config.logging === true) console.log('Renamed:\n' + newChildPath + '\n to \n' + currentChildPath);
} else {
rename(newChildPath, originNode);
}
Expand Down Expand Up @@ -311,6 +313,8 @@ function createFile(file, type, trg, modVal, cursorPos){
if (!fs.existsSync(p)) {
fs.writeFileSync(p, file);

if (config.logging === true) console.log('\nCreated:\n' + p);

if (options.g) gitAddTrg(trg, p);

if (options.o) {
Expand Down
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@
},
"deps_task": {
"files": [ "css" ]
}
},
"logging": false
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "git",
"url": "https://github.com/f0rmat1k/bemy.git"
},
"version": "2.1.4",
"version": "2.2.0",
"keywords": [
"bem",
"BEM Tools"
Expand Down

0 comments on commit 21cd63a

Please sign in to comment.