Created
October 3, 2015 04:27
-
-
Save okunishinishi/9ce06a729d78509219dd to your computer and use it in GitHub Desktop.
cozを使ってコピペ駆動開発を自動化する ref: http://qiita.com/okunishinishi@github/items/edecdf4e219e58809483
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Instal coz via npm | |
$ npm install coz -g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show installed coz version. | |
$ coz --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define rendering rule. | |
module.exports = { | |
path: 'have-a-nice-day.txt', // File path to write | |
tmpl: '.have-a-nice-day.txt.hbs', // Template file | |
force: true, // Overwrite each time | |
mode: '444', // As readyonly file | |
data: require('./my-datasource.json') // Data to render | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Have a nice day, {{name}}! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ coz render .*.bud |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Have a nice day, jhon! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var names = ["User", "Department"]; | |
module.exports = names.map(function(name) { | |
return { | |
path: name + 'Entity.py', | |
force: true, | |
mode: '444' | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment