Skip to content

Releases: f0rmat1k/bemy

{{BlockName}}, {{ElemName}} and {{ModName}}

01 May 12:29
Compare
Choose a tag to compare

Added new placeholders. Useful when you need capitalized notation. For example, my template for react:

import React from 'react';
import b from 'b_';

import './{{blockName}}.css';

export default class {{BlockName}} extends React.Component {
	constructor(props) {
		super(props);
	}

	render() {
		const {{blockName}} = b.with('{{blockName}}');

		return (
			<div className={{{blockName}}()}>
				{{cursor}}
			</div>
		);
	}
}

{{BlockName}}.contextTypes = {
	bunker: React.PropTypes.object
};

`filename` option

17 Sep 14:38
Compare
Choose a tag to compare

New option in json filename lets you set up your own resulting file name. Useful when you allways need index.css or index.jsx instead of BEM names.

New config option "auto_dir"

07 Feb 18:35
Compare
Choose a tag to compare

It let you set needed file types for autotask, when it is called on a directory.

Refactoring of templates

30 Apr 17:50
Compare
Choose a tag to compare

Thanks to @ilyar for pr #25 with refactoring of templates. Also have added new default templates (for stylus, i-bem with jsdoc, etc).
Warning! Some default templates has been changed. It's ok, if you use your own .bemy.json.

Hooks

24 Apr 17:24
Compare
Choose a tag to compare

I've added hooks calls for created files. Now you can set bash commands, which get path to created file with the first argument by replacing {{filePath}}. Example:
"template": [ "tmp/js-template.js", "node examples/hook.js {{filePath}}" ]
It's useful when you need more than provide template replacers.

Create folder if it's necessary

07 Apr 22:32
Compare
Choose a tag to compare

Now Bemy able to create folders with "create", through bemy -t create -f b-test/__block js;

thx to @iketari

Windows support

04 Apr 17:19
Compare
Choose a tag to compare

Added Windows support. Read more about peculiarities at relevant section of readme.md.

Improved configs system

04 Apr 08:34
Compare
Choose a tag to compare

– Now config of bemy is named .bemy.json.
– Now bemy will try to find .bemy.json on the every previous level (like npm) until the root directory, so you can put .bemy.json into your home directory or project directory if you need different options depend on project. Otherwise bemy will take .bemy.json from own directory.
– Option output renemed to debug.
– Added --debug key.
– now bemy open existing file if there is -o key (bemy isn't rewriting existing files)

Fixed an important bug with deps

27 Mar 18:37
Compare
Choose a tag to compare

Before 2.2.2 deps files with array on the first level was processing incorrectly, e.g.

([
    {
        tech: 'js',
        shouldDeps: [ { block: "foo", tech: "bemhtml" } ]
    },
    {
        mustDeps: [],
        shouldDeps: [
            { elems: ['foo', 'baz'] }
        ]
    }
]);

Now it fixed.

Added output

24 Mar 19:37
Compare
Choose a tag to compare

Added output.
If you want it, you should set "output": true in config.json. Default is false.