Skip to content

Conversation

@tonyganch
Copy link
Member

Issue #102

You can now create new Comb instance and configure it at the same time.
To use one of predefined configs, pass its name:

var comb = new Comb('zen'); // or `csscomb`, or `yandex`

To use custom config, pass its object:

 var comb = new Comb({ 'always-semicolon': true });

Also new Comb() and configure() are chainable now.
It means you can do things like:

// Init, configure and process:
var combed = new Comb('csscomb').processString('a { color: tomato }');

// Comb a file with one line of code:
new Comb().configure({ 'always-semicolon': true }).processFile('panda.less');

You can now create new Comb instance and configure it at the same time.
To use one of predefined configs, pass its name:

    var comb = new Comb('zen'); // or `csscomb`, or `yandex`

To use custom config, pass its object:

    var comb = new Comb({ 'always-semicolon': true });
You can now do things like:

    // Init, configure and process:
    var css = new Comb('csscomb').processFile('nani.scss');

    // Comb a file with one line of code:
    new Comb().configure({ 'always-semicolon': true }).processFile('panda.less');
@ghost ghost assigned mishanga Dec 12, 2013
mishanga added a commit that referenced this pull request Dec 17, 2013
Pass config to `new Comb()` and make it chainable (#102)
@mishanga mishanga merged commit a5d8462 into dev Dec 17, 2013
@mishanga mishanga deleted the tg/102-chainable-methods branch December 17, 2013 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants