theron-wang / VS2022-Editor-Support-for-Tailwind-CSS

Unofficial VS2022 Tailwind CSS extension for IntelliSense, linting, sorting, and more to enhance the development experience in Visual Studio 2022.
https://marketplace.visualstudio.com/items?itemName=TheronWang.TailwindCSSIntellisense
MIT License
89 stars 5 forks source link

[Feature request] Define a folder instead of a single css file built with Tailwind #46

Closed RemiCELLARD closed 1 month ago

RemiCELLARD commented 4 months ago

Hi,

I would like to know if we can add an extra parameter in the tailwind.extension.json file to configure an input folder and an output folder to build ? Also, is it possible to define a list of files instead of a single one in the InputCssFile and OutputCssFile fields?

Example:

{
    "ConfigurationFile":"tailwind\\tailwind.config.js",
    "InputCssFile": ["Tailwind\\css\\tailwind.css","Tailwind\\css\\secondfile.css"],
    "OutputCssFile":["wwwroot\\css\\tailwind.css","wwwroot\\css\\secondfile.css"],
    "UseCli":false
}

Thanks

theron-wang commented 3 months ago

Sorry about the delay. I'll try to get around to it soon - I'm still not too sure on how the best way to implement this is. The problem with using a list is that the context menu behavior would be inconsistent, but I am thinking that users can define a path template for output files (maybe, for each file, define a special folder for output/make the output file {name}.output.css?)

theron-wang commented 1 month ago

@RemiCELLARD Just added in 1.5.0; I opted for a new tailwind.extension.json format and deprecated the original InputCssFile and OutputCssFile, replacing it with BuildFiles. Here's a sample:

{
  "ConfigurationFile":"tailwind.config.js",
  "BuildFiles": [
    {
      "Input": "other.css",
      "Output": "other.output.css"
    },
    {
      "Input": "other2.css",
      "Output": "other2.output.css"
    }
  ],
  "UseCli": false
}

If you think there should be any changes, please feel free to let me know.