gulp-perfect-pixel
v0.4.2
Published
This plugin analog [PerfectPixel](http://www.welldonecode.com/perfectpixel/) but is different
Downloads
54
Maintainers
Readme
gulp-perfect-pixel
This plugin analog PerfectPixel but is different
- Photos adapt to the screen resolution (mobile, tablet, desktop and more)
- Begin position each image you can setting
Install
yarn add gulp-perfect-pixel -Dor
npm install --save-dev gulp-perfect-pixelUsage
Add in you gulpfile
const gulp = require('gulp');
const perfectPixel = require('gulp-perfect-pixel').default;
gulp.task('html-build', function () {
return gulp.src('./html/*.html')
.pipe(perfectPixel({}, {
rootPathImage: './perfectPixel',
}))
.pipe(gulp.dest('build'));
});and add image name which comprises
name_html_page.size.extension_image. By default
all image searcher by url /perfectPixel/size.extension_image when size this
|number_pximage will show on display with resolution morenumber_pxnumber_px|image will show on display with resolution lessnumber_px|number_one_px-number_two_px|image will show on display with resolution betweennumber_one_pxandnumber_two_px
Example:
index.|1200.jpgindex.720|.jpgindex.|720-1200|.jpg
If you use browsersync then just add in him config
browsersyncConfig = {
server: {
routes: {
'/perfectPixel': 'you_path_to_image',
}
}
}Hot key
Double click on mini controller panel open big controller panel.
AltLeft+KeyP open or close controller panel
AltLeft+KeyL lock or unLock drag and drop image
AltLeft+KeyH hide or unHide image
ArrowUp move image up
ArrowRight move image right
ArrowDown move image down
ArrowLeft move image left
