nxkit / nxkit

Keyboard crafted https://nx.dev plugins for your workspace
MIT License
43 stars 5 forks source link

How to delete previous output before new build #91

Open atomicrobokid opened 12 months ago

atomicrobokid commented 12 months ago

What type of documentation issue are you reporting?

Documentation improvement

Is there a specific documentation page you are reporting? Enter the URL here.

No response

Additional context

Hi,

I'm trying to work out how to delete a previous build as part of the usual build command but cannot work out how to go about it.

I can see from the code that it looks for options.deleteOutputPath however when I add the following the my style-dictionary.config.ts it fails with The "path" argument must be of type string. Received undefined.

platforms: {
    options: {
      deleteOutputPath: true
    },
}

This is on latest version.

Could you please document how to go about doing a clean before build? Does it belong in the project.json or the style dictionary config?

TIA!

Code of Conduct

timoyan commented 1 month ago

Maybe you could try deleteOutputPath to true with following config.

in project.json

 {
  "targets": {
    "build": {
      "executor": "@nxkit/style-dictionary:build",
      "outputs": ["{options.outputPath}"],
      "options": {
        "outputPath": "libs/components/src/design-token",
        "styleDictionaryConfig": "libs/design-token/style-dictionary.config.ts",
        "tsConfig": "libs/design-token/tsconfig.json",
        "deleteOutputPath": false
      }
    }
 }