-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copy assets to specified directory? #34
Comments
If one of the provided callback for |
The same problem. |
Hi guys! @zoubin i understand your problem, the next week i'm going to refactory the copy method and fix that issue. |
FYI to people who are looking for this feature: since the above were closed and not really resolved, I ended up creating postcss-copy-assets. |
Right now we can specify
assetPath
, which determines the value ofurl(value)
in css, and the destination of the copied asset will be calculated based on this info.That is very convenient if we want to specify a
url(value)
in css.I am handling cases where the value in
url(value)
does not matter as long as it is right, but the destination of the copied asset does.Here is an example.
css file
/path/to/src/page/index/index.css
:the asset file is
/path/to/src/page/index/i/sp-icon.png
I want to build css to
/path/to/build/page/index/index.css
, and the sprite to/path/to/build/sp/sp-icon.png
.So, in
/path/to/build/page/index/index.css
, it looks like:Any idea how to achieve this?
The text was updated successfully, but these errors were encountered: