An open API service indexing awesome lists of open source software.

https://github.com/thormeier/postcss-url-copy


https://github.com/thormeier/postcss-url-copy

Last synced: 29 days ago
JSON representation

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
}
```