css-should-plugin-bem
v2.1.1
Published
Define semantics of BEM methodics
Downloads
3
Readme
css-should-plugin-bem
Define semantics of Block element modifier methodics (http://getbem.com/naming/).
This middleware adds special x-should
properties into given CSS file.
Package css-should
(https://github.com/robinpokorny/css-should) could works with them and resolves whether CSS classes are written correctly according to BEM.
Under MIT Licence.
Installation
Package is available on NPM (https://www.npmjs.com/package/css-should-plugin-bem) and you could install like this:
npm instal css-should-plugin-bem
or yarn add css-should-plugin-bem
Scripts
yarn
ornpm install
- install dependencies
You can use both yarn
or npm run
to control application flow.
compile
- Starts Next.js applicationbuild
- Build dist file with Webpack.build:lib
- Build lib files.ava
- Runs AVA tests.test
- Generates code coverage report.tsc
- Runs typescript compiler.lint
- - Run TSlint.prettier:check
- Check pretty of code.prettier:fix
- Runs prettyfying of code.ci
- Runs Continuous Integration cascade (lint
,test
,prettier:check
).example:lint
- Lint example CSS file and show results in CLI.example:lint-with-error
- Lint example CSS file to demonstrate bad named classes according to BEM and show results in CLI.example:declarations
- Get BEM declarations for CSS-should, show them in CLI and save output into file.example:declarations-with-errors
- get BEM declarations with bad named classes according to BEM for CSS-should, show them in CLI and save output into file.
Examples
- run
npm run example:lint
to lint example CSS file and show results in CLI - run
npm run example:lint-with-error
to lint example CSS file to demonstrate bad named classes according to BEM and show results in CLI - run
npm run example:declarations
to get BEM declarations for CSS-should, show them in CLI and save output into file - run
npm run example:declarations-with-errors
to get BEM declarations with bad named classes according to BEM for CSS-should, show them in CLI and save output into file