在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):danielhusar/gulp-pleeease开源软件地址(OpenSource Url):https://github.com/danielhusar/gulp-pleeease开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-pleeeaseGulp plugin for pleeease See pleeease.io for documentation. Installnpm install --save-dev gulp-pleeease Examplevar gulp = require('gulp');
var pleeease = require('gulp-pleeease');
gulp.task('css', function () {
gulp.src('./src/*.css')
.pipe(pleeease())
.pipe(rename({
suffix: '.min',
extname: '.css'
}))
.pipe(gulp.dest('./dest'));
}); You can also use gulp.task('css', function () {
gulp.src('./src/*.css')
.pipe(pleeease({
out: 'out.min.css'
}))
.pipe(gulp.dest('./dest'));
}); Preprocessors supportAs simple as it looks, no need for specific gulp modules: var gulp = require('gulp');
var pleeease = require('gulp-pleeease');
gulp.task('css', function () {
gulp.src('./src/*.scss')
.pipe(pleeease({
sass: true
}))
.pipe(gulp.dest('./dest'));
}); Or maybe, if you have imports: var gulp = require('gulp');
var pleeease = require('gulp-pleeease');
gulp.task('css', function () {
gulp.src('./src/*.scss')
.pipe(pleeease({
sass: {
includePaths: ['path/to/include']
}
}))
.pipe(gulp.dest('./dest'));
}); You can use Sass, LESS or Stylus. Source map supportUsing gulp-sourcemaps. To get good sourcemaps, you should always specify var gulp = require('gulp');
var pleeease = require('gulp-pleeease');
var sourcemaps = require('gulp-sourcemaps');
gulp.task('css', function () {
gulp.src('./src/*.css', {base: '.'})
.pipe(sourcemaps.init())
.pipe(pleeease())
.pipe(sourcemaps.write())
.pipe(gulp.dest('./dest'));
}); And even with preprocessors. Here, using Stylus, and with sourcemaps as a separate file: var gulp = require('gulp');
var pleeease = require('gulp-pleeease');
var sourcemaps = require('gulp-sourcemaps');
gulp.task('css', function () {
gulp.src('./src/*.styl', {base: '.'})
.pipe(sourcemaps.init())
.pipe(pleeease({
stylus: {
paths: ['path/to/include']
}
}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./dest'));
}); OptionsSame as pleeease LicenseMIT © Daniel Husar |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论