Closed a-x- closed 7 years ago
Hi!
I think than with cli we want get info about files. For example, you can use bem-find.
Can you tell me what's the point of this?
Maybe we need to make another plugin for bem-tools
?
Hi, @blond! i want get struclural parts of bem names and check them, not to find files.
bem-naming bem_dfsf isBlockMod # (stdout: "True")
bem-naming bem__fdsfs_dfsf isBlockMod # (stdout: "\n")
bem-naming bem__fdsfs_dfsf isElemMod # True
bem-naming foo__bar_baz block # foo
bem-naming foo__bar_baz elem # bar
I still don't understand why.
@a-x- explain where it is to be used? In other tools or for users to to test bem-naming
?
But if do, then I would prefer this CLI:
Usage
$ bem-entity-part <command> <bem-entity-part>
Commands
type Returns type of BEM entity part
block Returns block name of BEM entity part
elem Returns elem name of BEM entity part
mod Returns mod of BEM entity part
Options
--naming Include a rainbow
Examples
$ bem-entity-part type button_disabled
blockMod
$ bem-entity-part block button__text
button
$ bem-entity-part block button--checked --naming=two-dashes
blockMod
Now we think about move part API from bem-naming
to bem-entity package. In bem-naming
must remain parse
and stringify
methods.
@a-x- your example more suited to bem-entity-part
.
sometimes i need to write bash one-liners working with bem world quickly.
bem-entity-part
It's cool and acceptable for me.
But name bem-entity-part
is not clear as i see. bem-naming
cli api would be more comprehensible for me.
add reference to bem-entity-part
cli on bem-naming readme please, as far as it'll be ready
I think that tenorok
is more suitable name
On Mon 16 May 2016 at 21:55 Александр invntrm@ notifications@github.com
wrote:
add reference to bem-entity-part cli on bem-naming readme please, as far as it'll be ready
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/bem-sdk/bem-naming/issues/117#issuecomment-219513243
@a-x- thanks for the explanation )
add reference to bem-entity-part cli on bem-naming readme please, as far as it'll be ready
sure
Still bothers me that bem-sdk
packages will have cli dependencies.
We can create bem-entity-part-cli
package or create bem-tools-entity-part
plugin, which will be provided entity-part
command.
$ bem entity-part type button_disabled
I published @bem/entity-name v1.0.0
.
@a-x- You can use it to create bem-tools-entity-name
plugin.
my quick dirty reference implementation: https://github.com/a-x-/bem-naming-cli/blob/master/bem-naming