Closed dmage closed 12 years ago
Обнови ometajs, пожалуйста. В текущей версии должно работать (даже без скобок).
Да, во время сборки оно ругается на ometajs, похоже не нужно было ставить ometajs рядом. Теперь не понятно что обновлять. :)
23:36:01.196 - info: [t] Build time for "pages/simple-chart/_simple-chart.js" [1]: 779ms
!!!
!!! Warning: you're using grammar compiled with previous version of ometajs. Please recompile it with the newest one
!!!
23:36:03.570 - info: [t] Build time for "pages/simple-chart/simple-chart.bemhtml.js" [1]: 5265ms
Вот список установленных пакетов (локально, так оно вызывается в GNUmakefile из bem-bl-test):
$ npm list
/home/dmage/tmp/b-chart
├─┬ bem@0.5.10
│ ├── apw@0.3.4
│ ├─┬ borschik@0.0.10
│ │ └─┬ cssp@1.0.6
│ │ └── ometajs@3.1.11
│ ├─┬ coa@0.3.5
│ │ └─┬ q@0.7.2
│ │ └── event-queue@0.2.0
│ ├── csso@1.2.15
│ ├── inherit@1.0.4
│ ├── memorystream@0.2.0
│ ├── mime@1.2.7
│ ├─┬ ometajs@2.1.10
│ │ ├─┬ q@0.7.2
│ │ │ └── event-queue@0.2.0
│ │ └── uglify-js@1.1.1
│ ├── q@0.8.5
│ ├─┬ q-fs@0.1.29
│ │ ├── fs-boot@0.0.8
│ │ └─┬ q-io@0.0.13
│ │ └── q@0.8.4
│ ├─┬ q-http@0.1.14
│ │ ├── q@0.8.4
│ │ └── q-io@0.0.13
│ ├─┬ qq@0.3.5
│ │ └── q@0.8.4
│ ├── uglify-js@1.3.2
│ ├── underscore@1.3.3
│ ├─┬ winston@0.6.2
│ │ ├── async@0.1.22
│ │ ├── colors@0.6.0-1
│ │ ├── cycle@1.0.0
│ │ ├── eyes@0.1.7
│ │ ├── pkginfo@0.2.3
│ │ ├── request@2.9.203
│ │ └── stack-trace@0.0.6
│ └─┬ xjst@0.2.21
│ ├── coa@0.3.1
│ ├─┬ q@0.7.2
│ │ └── event-queue@0.2.0
│ └── uglify-js@1.1.1
├─┬ ometajs@3.1.11
│ ├─┬ coa@0.3.5
│ │ └─┬ q@0.7.2
│ │ └── event-queue@0.2.0
│ ├── q@0.8.5
│ └── uglify-js@1.3.2
└─┬ xjst@0.3.3
├── coa@0.3.1
├── ometajs@3.1.11
├── q@0.8.5
└── uglify-js@1.3.2
npm install ometajs@2.1.x
и npm install xjst@0.2.x
должен помочь.
npm install ometajs@2.1.x
и npm install xjst@0.2.21
помогли, этот момент скомпилировался правильно. Спасибо.
С другой версией xjst была ошибка:
00:01:48.851 - info: [t] isValid() time for "pages/simple-chart/_simple-chart.js" [1]: 12ms
error: TypeError: object is not a function
00:01:49.606 - info: [t] Build time for "pages/simple-chart/simple-chart.bemhtml.js" [1]: 830ms
00:01:49.607 - info: [t] Build total: 1694ms
TypeError: object is not a function
at Function.matchAll (/home/dmage/tmp/b-chart/node_modules/xjst/node_modules/ometajs/lib/ometajs/core/grammar.js:42:14)
at [object Object].bemBuild (/home/dmage/tmp/b-chart/bem-bl/blocks-common/i-bem/bem/techs/bemhtml.js:24:42)
at /home/dmage/tmp/b-chart/node_modules/bem/lib/tech.js:646:38
at _fulfilled (/home/dmage/tmp/b-chart/node_modules/bem/node_modules/qq/node_modules/q/q.js:551:32)
at makePromise.promiseSend (/home/dmage/tmp/b-chart/node_modules/bem/node_modules/qq/node_modules/q/q.js:271:38)
at /home/dmage/tmp/b-chart/node_modules/bem/node_modules/qq/node_modules/q/q.js:573:18
at makePromise.promiseSend (/home/dmage/tmp/b-chart/node_modules/bem/node_modules/qq/node_modules/q/q.js:271:38)
at Array.<anonymous> (/home/dmage/tmp/b-chart/node_modules/bem/node_modules/qq/node_modules/q/q.js:195:35)
at EventEmitter._tickCallback (node.js:190:39)
Следующая строчка в .bemhtml
компилируется в
Возможно использовать || не совсем правильно, но тихо опускать скобки тут нельзя, лучше просто упасть на ||.