csscomb / csscomb.chocmixin

Chocolat mixin for CSScomb—CSS coding style formatter
3 stars 3 forks source link

Support csscomb.js #4

Open tonyganch opened 10 years ago

tonyganch commented 10 years ago

We have a node version of csscomb ready. It will be nice if this mixin is updated by the time of public release.

If someone starts working on this task, please leave a comment. Keep in mind that current (php) version should stay available for download. The easiest way is to make a release before making any changes. Thank you.

drudge commented 10 years ago

@tonyganch: I've updated the mixin to use the csscomb node module. This has been pushed as v2.0.0 and is live in Chocolat's "Install Mixin" menu.

tonyganch commented 10 years ago

@drudge, I don't like the idea of storing node_modules, the whole csscomb.js repo and all its dependencies in this plugin. And I'm sad that it's published already. Can we please discuss this?

tonyganch commented 10 years ago

@drudge, first of all, the plugin is broken now. Have you tested it? You can not use csscomb like this: new Comb().processString(text). There should be a config file. Default one is .csscomb.json in the root of the module. So code should like this:

var comb = new Comb(),
    config = require(pathToConfig);
comb.configure(config);
comb.processString(text);

Secondly, csscomb's module should be removed from this repo. There are at least two ways to include it:

  1. Ask users to run npm install csscomb -g and then require the global module inside your plugin.
  2. Require npm module inside your plugin, run npm install csscomb (either with spawn/exec, or with npm.load()) and then use the local module. The second one is preferred if there is no problem with write permissions.

Please, can you unpublish this broken version?