Answer the question
In order to leave comments, you need to log in
How to change all paths in styl from command line?
There is a need to add a prefix to all paths in the styles so that after compilation it turns out
. The documentation shows how to do this using a script , but I need to do this from the cli, since it is part of the npm script. There is an example in the doc (at the very bottom) of how you can pass call conditions to the plugin, and I tried to do it like this (found here ):background: url("images/image.jpg")
background: url("../prefix/images/image.jpg")
stylus --use url --with "{ paths: [ '../prefix/' ] }" src/styl --sourcemap --out dist/css
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question