sass-export icon indicating copy to clipboard operation
sass-export copied to clipboard

[REQUEST] Ignore comments & annotations

Open fuhlig opened this issue 8 years ago • 1 comments

Commented variables should not be parsed / ignored

Input:

$black: #000;
// $white: #fff;

Output:

{
  "variables": [
    {
      "name": "$black",
      "value": "#000",
      "compiledValue": "#000"
    },
    {
      "name": "$white",
      "value": "#fff",
      "compiledValue": "#fff"
    }
  ]
}

Expected:

{
  "variables": [
    {
      "name": "$black",
      "value": "#000",
      "compiledValue": "#000"
    }
  ]
}

Ignore variables with annotations (analogue to sections). Proposal:

  • ignore single line: // @sass-export-ignore
  • ignore multiple lines (section):
// @sass-export-ignore="internals"
...
// @end-sass-export-ignore [optional]

fuhlig avatar Dec 15 '17 13:12 fuhlig

Hi @fuhlig this was already in our plate #7 , but we discarded it since you can use your own @sass-export-section="internals" whenever you need it, event multiple times and then remove the node: "internals" if it is the case. I still think it would be cool to have it.

thanks!

civan avatar Dec 15 '17 19:12 civan