Giter VIP home page Giter VIP logo

bemstyla's Introduction

bemstyla's People

Contributors

pdehaan avatar vovanr avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

bemstyla's Issues

Add format file content

TODO

  • Add format file content
  • Plug to index and creator
  • Plug to cli
  • Readme

Default, styl, sass

.foo
    {}

Usage

.foo
    border: none

css, less, scss

.foo {
}

Usage

.foo {
    border: none;
}

BEViS support

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

Add mix exists

$ 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
        {}

More than one

$ bemstyla block__elem block__foo block__bar_baz

๐Ÿ‘Œ

Modifier separator

Based on input.

block_mod --> _
block--mod --> --

Parse with RegExp.

Default is _.
If /--/.test('block--mod') --> --

Refactoring

  • Parser
  • Use native Promise
  • Separate parser to npm package

Release v1.3.0

  • Changelog
  • Package version
  • Add tag
  • Release notes
  • Publish

Templates parser (Jade, HTML)

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;

Style file extension

Style file extension

bemstyla block__elem -t less
bemstyla block__elem --type css

One block One file

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 {
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.