use personnal config for prettycss cli · Issue #26 · fidian/PrettyCSS · GitHub

/26

  • PrettyCSS - fidian.com
    http://www.fidian.com/prettycss

    This program is a JavaScript based #css pretty printing / beautification tool that also does structure validation. It can run in a browser (as seen below) or on a server with node.js or Rhino. You can tie into it so that your CSS is minified or is always in a readable format. If you add this to your SCM system as some sort of hook so that every time someone commits CSS to a repository, it can get automatically validated and massaged into the way you want it to look.

    #lint #formater #npm #shell

    • @nicod_ pour grunt je ne sais pas, mais oui j’ai joué avec et ça me permet de remplacer avantageusement le service en ligne que j’utilisais avant (http://procssor.com).

      Seul problème, la version en ligne de commande ne permet pas pour l’instant d’utiliser un fichier de config perso, j’ai ouvert un ticket à ce sujet et on peut y trouve la config que j’utilise de mon côté :

      https://github.com/fidian/PrettyCSS/issues/26

    • Pour info, maintenant il est possible d’utiliser un fichier de conf perso pour prettycss en shell :)

      prettycss -c /home/bb/.config/prettycss.conf --ignore-all vilain.css > mignon.css

      Mon fichier de conf est dispo sur ce gist :

      https://gist.github.com/brunob/d16beef0f181a55e24b5

      {
      "rules":{
      "indentation":"tab",
      "string-quotes":"single",
      "color-hex-case":"lower",
      "value-list-comma-space-after":"always",
      "declaration-colon-space-after":"always",
      "declaration-colon-space-before":"never",
      "declaration-block-semicolon-newline-after":"never-multi-line",
      "declaration-block-semicolon-space-after":"always-single-line",
      "declaration-block-trailing-semicolon":"always",
      "block-closing-brace-newline-after":"always",
      "block-closing-brace-space-before":"always-single-line",
      "block-opening-brace-newline-after":"never-multi-line",
      "block-opening-brace-newline-before":"never-multi-line",
      "block-opening-brace-space-after":"always",
      "block-opening-brace-space-before":"always",
      "selector-list-comma-newline-after":"always",
      "selector-list-comma-space-after":"never",
      "media-feature-colon-space-after":"always",
      "media-feature-colon-space-before":"never",
      "media-feature-name-case":"lower",
      "media-feature-parentheses-space-inside":"never",
      "media-feature-range-operator-space-after":"always",
      "media-feature-range-operator-space-before":"always",
      "at-rule-name-space-after":"always",
      }
      }