Skip to content

Commit

Permalink
Rename option names
Browse files Browse the repository at this point in the history
  • Loading branch information
mdevils committed May 26, 2014
1 parent 4bd0022 commit b916316
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Версия 0.13.0:
* Для технологии `file-copy` переименованы опции `sourceTarget` -> `source`, `destTarget` -> `target`.

Версия 0.12.0:
* Новые моки для `fs`.
* Автоматически создаем директории для страниц.
Expand Down
18 changes: 12 additions & 6 deletions techs/file-copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
*
* **Опции**
*
* * *String* **sourceTarget** — Исходный таргет. Обязательная опция.
* * *String* **destTarget** — Результирующий таргет. Обязательная опция.
* * *String* **source** — Исходный таргет. Обязательная опция.
* * *String* **target** — Результирующий таргет. Обязательная опция.
*
* **Пример**
*
* ```javascript
* nodeConfig.addTech([ require('enb/techs/file-copy'), {
* sourceTarget: '?.css',
* destTarget: '_?.css'
* source: '?.css',
* target: '_?.css'
* } ]);
* ```
*/
Expand All @@ -28,8 +28,14 @@ module.exports = inherit(require('../lib/tech/base-tech'), {
},

configure: function () {
this._source = this.getRequiredOption('sourceTarget');
this._target = this.getRequiredOption('destTarget');
this._source = this.getOption('sourceTarget');
if (!this._source) {
this._source = this.getRequiredOption('source');
}
this._target = this.getOption('destTarget');
if (!this._target) {
this._target = this.getRequiredOption('target');
}
},

getTargets: function () {
Expand Down

0 comments on commit b916316

Please sign in to comment.