fidian / PrettyCSS

CSS beautifier, lint checker, validator
Other
34 stars 12 forks source link

use personnal config for prettycss cli #26

Closed brunob closed 10 years ago

brunob commented 10 years ago

Hi @fidian and thanks for PrettyCSS, this is not an issue just a question.

I've got a personal config with options that suite to my needs if i use the exemple page provided. How can i specify this options when using prettycss form the command line (i mean use other options that the ones specified in lib/utils.js) ?

Thanks ++

fidian commented 10 years ago

You'll have to use the various flags to enable or disable options. If they don't do what you need, please let me know where a flag or option is required.

Tyler Akins

On Thu, Apr 17, 2014 at 3:40 PM, b_b notifications@github.com wrote:

Hi @fidian https://github.com/fidian and thanks for PrettyCSS,

I've got a personal config with options that suite to my needs if i use the exemple page provided. How can i specify this options when using prettycss form the command line ?

Thanks ++

— Reply to this email directly or view it on GitHubhttps://github.com/fidian/PrettyCSS/issues/26 .

brunob commented 10 years ago

Thanks for answer, i've seen these options available :

-h, --help      Display this help message
-i, --ignore code
                Ignore a type of warning
--ignore-all    Ignore all warnings
--stop-on-errors
                Stop when an error is encountered
--stop-on-warnings
                Stop when a warning is encountered
-s, --stop-on-problems
                Same as --stop-on-errors --stop-on-warnings

But what i'm searching is to pass options to parseFile() as defined in lib/util.js ? Is it possible to specifiy a path to a config file or a json object, or anything like this ? Maybe i'm missing a point...

fidian commented 10 years ago

Understood. I should allow that. Would you be willing to share your config? On Apr 17, 2014 4:47 PM, "b_b" notifications@github.com wrote:

Thanks for answer, i've seen these options available :

-h, --help Display this help message -i, --ignore code Ignore a type of warning --ignore-all Ignore all warnings --stop-on-errors Stop when an error is encountered --stop-on-warnings Stop when a warning is encountered -s, --stop-on-problems Same as --stop-on-errors --stop-on-warnings

But what i'm searching is to pass options to parseFile() as defined in lib/util.js ? Is it possible to specifiy a path to a config file or a json object, or anything like this ? Maybe i'm missing a point...

— Reply to this email directly or view it on GitHubhttps://github.com/fidian/PrettyCSS/issues/26?utm_campaign=website&utm_source=sendgrid.com&utm_medium=email#issuecomment-40729150 .

brunob commented 10 years ago

Sure :) It looks like that :

{
    at_post: "\n",
    atblock_pre: "{",
    atblock_post: "}",
    block_pre: " { ",
    block_post: "}",
    declaration_post: " ",
    important: "!important",
    indent: " ",
    ruleset_post: "\n",
    selector_whitespace: " ",
    selector_comma: ",\n",
    topcomment_pre: "\n",
    topcomment_post: "\n",
    value_pre: " "
}
brunob commented 10 years ago

Hi @fidian any news about this functionality ? :)

fidian commented 10 years ago

Sorry. With my business trips and my recent holiday, I have not had any time to implement this feature.

Tyler Akins

On Wed, Jun 18, 2014 at 12:18 PM, b_b notifications@github.com wrote:

Hi @fidian https://github.com/fidian any news about this functionality ? :)

— Reply to this email directly or view it on GitHub https://github.com/fidian/PrettyCSS/issues/26#issuecomment-46422908.

brunob commented 10 years ago

Hi @fidian, no problem i don't want to urge you on this.

fidian commented 10 years ago

You can now use "-c" or "--config" to specify a config file. Those options will get passed to the beautifier code.

brunob commented 10 years ago

Great, thanks a lot @fidian :)

brunob commented 10 years ago

@fidian could you push this new release to npm please ?

fidian commented 10 years ago

Absolutely. Updated package.json, tagged, pushed, published.

Thanks for the reminder.

brunob commented 10 years ago

Thanks to you :)

brunob commented 10 years ago

Just to share my full personal config file, here it is : https://gist.github.com/brunob/d16beef0f181a55e24b5

brunob commented 7 years ago

@fidian ftr my config file listed here doesn't work anymore with 0.3.15 version, seems to have problem with atblock_pre/post :\ It prints things like that :

OUT for block
color: #52a624; 
!!!done`

I'm looking to the diff to search the origin of the bug https://github.com/fidian/PrettyCSS/compare/0.3.12...fidian:0.3.15

fidian commented 7 years ago

Would you open a new issue so we can discuss it there?

brunob commented 7 years ago

For sure #52 :)