https://github.com/stackcss/sheetify-inline
a plugin transforms img to base64 for sheetify
https://github.com/stackcss/sheetify-inline
Last synced: 5 months ago
JSON representation
a plugin transforms img to base64 for sheetify
- Host: GitHub
- URL: https://github.com/stackcss/sheetify-inline
- Owner: stackcss
- Created: 2017-10-11T08:31:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-11T01:37:06.000Z (over 7 years ago)
- Last Synced: 2025-07-08T13:40:48.194Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sheetify-inline [![stability][0]][1]
[![npm version][2]][3] [![downloads][4]][5]
![travis build][6]
Plugin transforms img to base64 for sheetify
works with async functions (node 7.6+)
## Example
before:
```css
div{
background: url('test.png')
}
```
after:
```css
div{
background: url('data:image/png;base64,iVBORw0KGgoAAA...')
}
```
## Test
`npm test`
## Command line
```sh
$ browserify entry.js -t [ sheetify/transform -t sheetify-inline ]
```
## JS api
```js
const browserify = require('browserify')
browserify()
.transform('sheetify/transform', { transform: [ 'sheetify-inline' ] })
.bundle()
```
## Installation
```sh
$ npm install sheetify-inline
```
## License
[MIT](https://tldrlegal.com/license/mit-license)
[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square
[1]: https://nodejs.org/api/documentation.html#documentation_stability_index
[2]: https://img.shields.io/npm/v/sheetify-inline.svg?style=flat-square
[3]: https://npmjs.org/package/sheetify-inline
[4]: http://img.shields.io/npm/dm/sheetify-inline.svg?style=flat-square
[5]: https://npmjs.org/package/sheetify-inline
[6]: https://travis-ci.org/stackcss/sheetify-inline.svg?branch=master