https://github.com/thormeier/postcss-url-copy
https://github.com/thormeier/postcss-url-copy
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/thormeier/postcss-url-copy
- Owner: thormeier
- License: mit
- Created: 2025-02-25T15:13:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-25T15:52:25.000Z (over 1 year ago)
- Last Synced: 2025-02-25T16:28:09.681Z (over 1 year ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# postcss-url-copy
A small PostCSS plugin to copy assets from an entry path to a given path. Offers functions to transform the URL both before
loading (to transform any aliases to something on disk) and before writing (to specify what path should be written to
the CSS file).
## Options
```
{
destPath: string // Absolute path to where to write the distributable files lie
assetsDestPath: string // Absolute path to where to write the assets to
transformUrlBeforeLoad: (url: string) => string // To transform the URL before the file on disk is being loaded
transformUrlBeforeWrite: (url: string) => string // To transform the URL before it's written to the CSS file, gets result of transformUrlBeforeLoad
}
```