Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stereobooster/lqip.macro
Creates LQIP at build time, similar to webpack lqip-loader
https://github.com/stereobooster/lqip.macro
Last synced: about 2 months ago
JSON representation
Creates LQIP at build time, similar to webpack lqip-loader
- Host: GitHub
- URL: https://github.com/stereobooster/lqip.macro
- Owner: stereobooster
- License: mit
- Fork: true (pveyes/raw.macro)
- Created: 2018-05-07T13:28:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-22T13:57:17.000Z (over 5 years ago)
- Last Synced: 2024-07-18T14:50:52.746Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 664 KB
- Stars: 38
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lqip.macro
[![Build Status](https://travis-ci.org/stereobooster/lqip.macro.svg?branch=master)](https://travis-ci.org/stereobooster/lqip.macro) [![Babel Macro](https://img.shields.io/badge/babel--macro-%F0%9F%8E%A3-f5da55.svg?style=flat-square)](https://github.com/kentcdodds/babel-plugin-macros)
> Webpack [`lqip-loader`](https://github.com/zouhir/lqip-loader) implemented as [`babel-plugin-macros`](https://github.com/kentcdodds/babel-plugin-macros)
## Usage
Similar to nodejs `require` call:
```js
import lqip from "lqip.macro";const preview = lqip("./image.jpg");
```### Example of usage in create-react-app
```js
import coverImage from "./cover-image.jpg";
import lqip from "lqip.macro";
const coverLqip = lqip("./cover-image.jpg");const SomeComponent = () => (
);
```## Credits
Based on [pveyes/raw.macro](https://github.com/pveyes/raw.macro).
## License
MIT