Skip to content

Commit

Permalink
Merge pull request #80 from enb-bem/issue-79
Browse files Browse the repository at this point in the history
Support ENB 1.x
  • Loading branch information
blond committed Oct 8, 2015
2 parents 21ffee4 + 96de358 commit 5a1e610
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ enb-bem-i18n
npm install --save-dev enb-bem-i18n
```

**Требования:** пакет `enb` версии `0.11.0` или выше.
**Требования:** пакет `enb` версии `0.15.0` или выше.

## Обзор документа

Expand Down
2 changes: 1 addition & 1 deletion lib/keysets.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var path = require('path'),
asyncRequire = require('enb/lib/fs/async-require'),
asyncRequire = require('enb-async-require'),
clearRequire = require('clear-require');

/**
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,24 @@
"node": ">= 0.10.0"
},
"peerDependencies": {
"enb": ">= 0.11.0 < 1.0.0"
"enb": ">= 0.15.0 < 2.0.0"
},
"dependencies": {
"clear-require": "1.0.1",
"dom-js": "0.0.9",
"enb-async-require": "1.0.1",
"serialize-javascript": "1.1.2",
"vow": "0.4.10"
},
"devDependencies": {
"bower": "1.5.2",
"chai": "3.2.0",
"enb": ">= 0.11.0 < 1.0.0",
"enb": ">= 0.15.0 < 2.0.0",
"istanbul": "0.3.20",
"jscs": "1.13.1",
"jshint": "2.8.0",
"mocha": "2.3.2",
"mock-enb": "0.2.0",
"mock-enb": "0.3.0",
"mock-fs": "3.2.0",
"must": "0.12.0"
},
Expand Down
4 changes: 3 additions & 1 deletion techs/i18n.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
var EOL = require('os').EOL,
enb = require('enb'),
buildFlow = enb.buildFlow || require('enb/lib/build-flow'),
keysets = require('../lib/keysets'),
compile = require('../lib/compile');

Expand Down Expand Up @@ -47,7 +49,7 @@ var EOL = require('os').EOL,
* });
* };
*/
module.exports = require('enb/lib/build-flow').create()
module.exports = buildFlow.create()
.name('i18n')
.target('target', '?.lang.{lang}.js')
.defineRequiredOption('lang')
Expand Down
4 changes: 3 additions & 1 deletion techs/keysets-xml.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
var EOL = require('os').EOL,
enb = require('enb'),
buildFlow = enb.buildFlow || require('enb/lib/build-flow'),
keysets = require('../lib/keysets'),
domjs = require('dom-js');

Expand Down Expand Up @@ -45,7 +47,7 @@ var EOL = require('os').EOL,
* });
* };
*/
module.exports = require('enb/lib/build-flow').create()
module.exports = buildFlow.create()
.name('keysets-xml')
.target('target', '?.keysets.{lang}.xml')
.defineRequiredOption('lang')
Expand Down
4 changes: 3 additions & 1 deletion techs/keysets.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
var vow = require('vow'),
enb = require('enb'),
buildFlow = enb.buildFlow || require('enb/lib/build-flow'),
serialize = require('serialize-javascript'),
keysets = require('../lib/keysets');

Expand Down Expand Up @@ -37,7 +39,7 @@ var vow = require('vow'),
* });
* };
*/
module.exports = require('enb/lib/build-flow.js').create()
module.exports = buildFlow.create()
.name('keysets')
.target('target', '?.keysets.{lang}.js')
.defineRequiredOption('lang')
Expand Down
5 changes: 3 additions & 2 deletions test/techs/keysets.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var fs = require('fs'),
serializeJS = require('serialize-javascript'),
MockNode = require('mock-enb/lib/mock-node'),
FileList = require('enb/lib/file-list'),
loadDirSync = require('mock-enb/utils/dir-utils').loadDirSync,
clearRequire = require('clear-require'),
Tech = require('../../techs/keysets');

Expand Down Expand Up @@ -578,7 +579,7 @@ describe('keysets', function () {
fileList = new FileList(),
dirList = new FileList();

fileList.loadFromDirSync(dirname);
fileList.addFiles(loadDirSync(dirname));

bundle.provideTechData('?.files', fileList);
bundle.provideTechData('?.dirs', dirList);
Expand Down Expand Up @@ -624,7 +625,7 @@ describe('keysets', function () {
fileList = new FileList(),
dirList = new FileList();

fileList.loadFromDirSync(dirname);
fileList.addFiles(loadDirSync(dirname));

bundle.provideTechData('?.files', fileList);
bundle.provideTechData('?.dirs', dirList);
Expand Down

0 comments on commit 5a1e610

Please sign in to comment.