0.1.1 • Published 3 years ago

postcss-ipfs v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

PostCSS IPFS

PostCSS plugin for replacing IPFS strings.

Write this:

.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:

.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

postcss([ require('postcss-ipfs') ])

See PostCSS docs for examples regarding usage.

Options

gateway

  • Type: string
  • Default: https://ipfs.io/

Gateway that will replace ipfs:// links.

0.1.1

3 years ago

0.1.0

3 years ago