Skip to content

Commit

Permalink
[enb#425] changed sample for techs/write-file
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelpower committed Feb 21, 2016
1 parent 665314e commit 5f5690c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion techs/write-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,25 @@
*
* **Пример**
*
* Генерируем текстовый-файл
*
* ```javascript
* nodeConfig.addTech([ require('enb/techs/write-file'), {
* content: 'bla bla bla',
* fileOptions: {
* encoding: 'utf8', // default
* mode: '0o666', // default
* flag: 'w' //default
* },
* target: '?.bla.txt'
* } ]);
* ```
*
* Генерируем bemdecl-файл
*
* ```javascript
* nodeConfig.addTech([ require('enb/techs/write-file'), {
* content: ['exports.blocks = [\n', '{name: "b-log"}, {name: "b-flag"}', '\n];'].join('\n'),
* content: 'exports.blocks = {name: "bla"}',
* fileOptions: {
* encoding: 'utf8', // default
* mode: '0o666', // default
Expand Down

0 comments on commit 5f5690c

Please sign in to comment.