Use my helpful โ Services
Read my mega ๐ Notes
vovanr / bemstyla Goto Github PK
View Code? Open in Web Editor NEWCreates block__elem_mod-name_mod-value styl files
License: MIT License
Creates block__elem_mod-name_mod-value styl files
License: MIT License
Use my helpful โ Services
Read my mega ๐ Notes
Copy test from posthtml-cli
styl
, sass
.foo
{}
Usage
.foo
border: none
css
, less
, scss
.foo {
}
Usage
.foo {
border: none;
}
https://www.npmjs.com/package/update-notifier
https://github.com/sindresorhus/ava/blob/master/cli.js
var updateNotifier = require('update-notifier');
updateNotifier({pkg: cli.pkg}).notify();
VovanR
โ Vladimir Rodkin
What if I work with BEViS?
Super mix
bemstyla foo__bar _mod-name_mod-val _baz_qux lol lol__rofl _trollollo
Modifier
.block__elem._mod-name_mod-val
{}
Maybe separated package with deps
$ tree
.
โโโ article
โย ย โโโ __preview
โย ย โย ย โโโ article__preview.styl
โย ย โโโ article.styl
โโโ preview
โโโ __image
โย ย โโโ preview__image.styl
โโโ preview.styl
$ cat article/__preview/article__preview.styl
.article__preview
{}
bemstyla article --mix preview
$ cat article/__preview/article__preview.styl
.article__preview
{}
.preview__image
{}
$ bemstyla block__elem block__foo block__bar_baz
๐
For example:
bemstyla ../jade/foo.jade -d ./blocks/
bemstyla ../jade/foo.jade --dir ./blocks/
Based on input.
block_mod
--> _
block--mod
--> --
Parse with RegExp.
Default is _
.
If /--/.test('block--mod')
--> --
Promise
Mock fs
and mkdir
mock-fs
http://sinonjs.org/docs/#mocks
Dir exists
bemstyla -d /asdf foo
Write permissions
bemstyla -d / bar
What if separate parser?
Don't know this package or separated with deps. Or simple Bash alias.
Jade
bemstyla ./foo-page.jade
var rx = /\.([^\s\.]+)/g;
HTML
bemstyla ./foo-page.html
var rx = /class="(.+?)"/g;
bemstyla block__elem -t less
bemstyla block__elem --type css
Write elements inited style to block style instead separated files
bemstyla -s post__header post__body post__footer
bemstyla --single post__header post__body post__footer
Styl
.post
&__header
{}
&__body
{}
&__footer
{}
CSS
.post {
}
.post__header {
}
.post__body {
}
.post__footer {
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.