Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ggkovacs/gulp-px2rem
This is a gulp plugin for node-px2rem.
https://github.com/ggkovacs/gulp-px2rem
gulp gulp-plugin node-px2rem nodejs px2rem
Last synced: 3 months ago
JSON representation
This is a gulp plugin for node-px2rem.
- Host: GitHub
- URL: https://github.com/ggkovacs/gulp-px2rem
- Owner: ggkovacs
- License: mit
- Created: 2014-11-13T06:14:19.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T00:33:15.000Z (about 2 years ago)
- Last Synced: 2024-10-25T22:34:38.575Z (3 months ago)
- Topics: gulp, gulp-plugin, node-px2rem, nodejs, px2rem
- Language: JavaScript
- Homepage:
- Size: 1.24 MB
- Stars: 20
- Watchers: 2
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [gulp](https://github.com/gulpjs/gulp)-px2rem [![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url]
Version: **1.1.4**This is a Gulp plugin for [node-px2rem](https://github.com/ggkovacs/node-px2rem).
## Installation
Run `npm install gulp-px2rem`
## Usage
```js
const px2rem = require('gulp-px2rem');gulp.task('css', () => {
return gulp.src('css/**/*.css')
.pipe(px2rem())
.pipe(gulp.dest('css'));
});
```## Options
Pass in two option objects. The first one for [node-px2rem](https://github.com/ggkovacs/node-px2rem) options, the second for [postcss](https://github.com/postcss/postcss) options.
```js
const px2rem = require('gulp-px2rem');const px2remOptions = {
replace: false
};const postCssOptions = {
map: true
};gulp.task('css', () => {
return gulp.src('css/**/*.css')
.pipe(px2rem(px2remOptions, postCssOptions))
.pipe(gulp.dest('css'));
});
```# License
MIT © 2021 Gergely Kovács ([email protected])[npm-image]: https://badge.fury.io/js/gulp-px2rem.svg
[npm-url]: https://npmjs.org/package/gulp-px2rem
[daviddm-image]: https://david-dm.org/ggkovacs/gulp-px2rem.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/ggkovacs/gulp-px2rem