emeks-studio / antd-custom-theme-generator

A simple way to create an antd theme css file with zero configuration.
https://www.npmjs.com/package/@emeks/antd-custom-theme-generator
Apache License 2.0
30 stars 6 forks source link

Invalid cwd path for lessc command #10

Closed mansdahlstrom1 closed 3 years ago

mansdahlstrom1 commented 3 years ago

Tested with a mac running node v14.15.4

This command that generates the css file via lessc is currently not correct when running as a npm script

Npm Script in my package.json: "generate-theme": "generate-theme verbose ./styles/custom-theme.less ./styles/custom-theme.css"

The problem seems to be line 61. { cwd: __dirname },. When i remove this line it works properly.

When using cwd: __dirname the script tries to find lessc under /<fullpath-to-root-folder>/node_modules/@emeks/antd-custom-theme-generator. By removing line 61, the script instead defaults to /<fullpath-to-root-folder>/.

mk-emeks commented 3 years ago

@mansdahlstrom1 I think latest version v0.2.0 fix this issue :smiley: (sorry for the delay)