-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per level naming #34
Per level naming #34
Conversation
README.md
Outdated
@@ -52,7 +52,7 @@ On file system: | |||
|
|||
``` | |||
blocks/Attach/ | |||
├── Attach.react.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was added to show how techMap works:
check it earlier in readMe
techMap: {
js : ['react.js']
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll revert this changes
index.js
Outdated
@@ -4,8 +4,9 @@ const path = require('path'), | |||
bn = require('@bem/naming'), | |||
BemCell = require('@bem/cell'), | |||
BemEntityName = require('@bem/entity-name'), | |||
bemFs = require('@bem/fs-scheme')(), | |||
bemFs = require('@bem/fs-scheme')(), // TODO: plain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's better to add issue instead of TODO ?
), | ||
levels = options.levels, | ||
options = Object.assign({}, this.options.bemLoader, loaderUtils.getOptions(this)), | ||
levelsMap = bemConfig.levelMapSync() || opts.levels, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So then change readme to show that levels could be hash
@@ -68,7 +67,8 @@ module.exports = function(source) { | |||
}, []) | |||
// find path for every entity and check it existance | |||
.map(bemCell => { | |||
const entityPath = path.resolve(bemFs.path(bemCell, namingOptions)); | |||
const localNamingOpts = levelsMap[bemCell.layer].naming || namingOptions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't sure but I think that bemCell.layer is absolute path. did you check it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's ok
"@bem/import-notation": "^1.1.2", | ||
"@bem/naming": "^2.0.0-6", | ||
"bem-config": "^3.2.3", | ||
"falafel": "^2.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's major, nothing changed in API ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works)
@@ -53,6 +51,7 @@ module.exports = function(source) { | |||
|
|||
const existingEntitiesPromises = bemImport.parse( | |||
node.arguments[0].value, | |||
// FIXME: we really need this context for parsing import? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember =( that's why issues are better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's my comment) I asked about the next line)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's could be a problem if we use bemNaming here
I suppose we need to use bem-fs-scheme here because we are parsing name of file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends on bem-sdk-archive/bem-fs-scheme#18
Close #25