Handy search BEM-entities from project levels for Atom.
Atom is a text editor for development.
BEM is a component-based approach for web development.
› apm install bem-levels
Unfortunately, now Atom has no built-in mechanism for per-project config settings. Because of this reason bem-levels use package local-config for store information about project levels.
Format of local config similar to the Atom global configuration settings.
Example of .atom.cson
in project root:
'*':'bem-levels':'levels':'touch': ['lib1/common.blocks/''lib1/touch.blocks/''lib2/touch.blocks/''common.blocks/''touch.blocks/']
In example above specified that for any file (*
), package bem-levels
has group touch
, which consists of levels list.
We already can use bem-levels by invoke command-palette with shift-cmd-p
shortcut, then type "Bem Levels: Touch" and press enter. This sequence of actions each time can be tedious. Atom allows to customize key bindings.
Example of ~/.atom/keymap.cson
:
'atom-workspace':'shift-cmd-i': 'bem-levels:touch'
Schema of all options is stored in the property configSchema
from package.json
.
Sets target technologies of files for searching.
In fact it is regexp for match extensions (js
, bemhtml.js
, etc) of files.
Default: .*
Example of searching only *.js
and *.bemhtml.js
files:
'*':'bem-levels':'targetTechs': '^js|bemhtml.js'
› git clone https://github.com/tenorok/atom-bem-levels.git
› cd atom-bem-levels
› npm install
› apm link
Package @bem/walk used for work with BEM file structure. Packages @bem/naming and @bem/entity-name used for work with BEM entities.
Atom package file-icons used for create file icons to list.
For run tests used mocha and chai with assert style.
Also used flowtype with comment syntax for type checking on precommit hook.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.