Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cofob/postcss-ipfs
https://github.com/cofob/postcss-ipfs
Last synced: about 22 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/cofob/postcss-ipfs
- Owner: cofob
- License: mit
- Created: 2022-11-22T11:40:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-07T17:00:18.000Z (about 1 year ago)
- Last Synced: 2024-10-12T00:25:50.763Z (27 days ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PostCSS IPFS [][PostCSS]
[PostCSS] plugin for replacing IPFS strings.
**Write this:**
```css
.foo {
background-image: url(ipfs://Qmhash/path/to/file.png);
}.bar {
background-image: url(ipns://some.ipns.link/path/to/file.png);
}
```**And get this:**
```css
.foo {
background-image: url(https://ipfs.io/ipfs/Qmhash/path/to/file.png);
}.bar {
background-image: url(https://ipfs.io/ipns/some.ipns.link/path/to/file.png);
}
```## Installation
`$ npm install postcss-ipfs`
## Usage
```JS
postcss([ require('postcss-ipfs') ])
```See [PostCSS](https://github.com/postcss/postcss) docs for [examples regarding usage](https://github.com/postcss/postcss#usage).
## Options
### `gateway`
- Type: `string`
- Default: `https://ipfs.io/`Gateway that will replace `ipfs://` links.
[PostCSS]: https://github.com/postcss/postcss