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

Generate theme path error on Windows #7

Closed pooooriya closed 3 years ago

pooooriya commented 3 years ago

$ generate-theme './styles/custom-theme.less' './styles/custom-theme.css' Error: Command failed: node_modules/less/bin/lessc --js /tmp/generated-theme.less C:\Users\Administrator\Desktop\test\rtimer\'.\styles\custom-theme.css' 'node_modules' is not recognized as an internal or external command, operable program or batch file.

at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {

killed: false, code: 1, signal: null, cmd: "node_modules/less/bin/lessc --js /tmp/generated-theme.less C:\Users\Administrator\Desktop\test\rtimer\'.\styles\custom-theme.css'" }

cant use generate theme command

pooooriya commented 3 years ago

its only work on linux and mac and not working on windows !!!!!

singhtamanpreet commented 3 years ago

@pooooriya

System: Ubuntu

Follow these steps:

For example @primary-color: #03989e;

After that,

npx @emeks/antd-custom-theme-generator generate-theme

You will get output in a file named custom-theme.css

singhtamanpreet commented 3 years ago

I am not able to generate dark mode css by using this command

npx @emeks/antd-custom-theme-generator generate-theme

Kindly provide an example to do so. Thanks in advance

randomeduc commented 3 years ago

Hey thanks for report the issue

@pooooriya we will check that and try to figure out what happen with Windows paths, stay tune.

@singhtamanpreet I check that the doc is wrong because the generate-theme arg is no longer needed. For example if you want to run dark theme you need this command npx @emeks/antd-custom-theme-generator ./custom-theme.less ./custom-theme.css ./node_modules/antd dark. We will fix that too and add some examples, thanks!

mk-emeks commented 3 years ago

@pooooriya new release v0.2.0 in case you want to give it a try!