本文整理汇总了TypeScript中gulp-less类的典型用法代码示例。如果您正苦于以下问题:TypeScript gulp-less类的具体用法?TypeScript gulp-less怎么用?TypeScript gulp-less使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了gulp-less类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
gulp.task("less", () => {
gulp.src("less/**/*.less")
.pipe(less({
paths: ["less/includes"]
}))
.pipe(gulp.dest("public/css"));
});
示例2: function
gulp.task('less', function() {
return gulp.src('./app/style/**/*.less')
.pipe(less({
paths: [__dirname + '/app/style']
}))
.pipe(gulp.dest('./app/style'));
});
示例3: processCSS
export default function processCSS() {
gulp.src(project.cssProcessor.source)
.pipe(changedInPlace({firstPass:true}))
.pipe(sourcemaps.init())
.pipe(less())
.pipe(build.bundle());
};
示例4: buildStyles
export default function buildStyles() {
gulp.src(project.paths.styles)
.pipe(changed(project.paths.output, {extension: '.css'}))
.pipe(sourcemaps.init())
.pipe(less())
.pipe(sourcemaps.write())
.pipe(gulp.dest(project.paths.output));
};
示例5: processCSS
export default function processCSS() {
return gulp.src(project.cssProcessor.source)
.pipe(changedInPlace({ firstPass: true }))
.pipe(plumber({ errorHandler: notify.onError('Error: <%= error.message %>') }))
.pipe(sourcemaps.init())
.pipe(less())
.pipe(build.bundle());
}
示例6:
gulp.task("styles:build", () => {
return gulp.src(paths.less.sources)
.pipe(sourcemaps.init({
loadMaps: true,
}))
.pipe(less())
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(paths.build_dir.css))
})
示例7: default
export default (target: string) => {
const paths = {
less: [
'./src/less/*.less',
'./src/components/**/*.less',
`./src/${target}/**/*.less`
],
tbui: [
'./src/less/tb-fonts-variables.less',
'./tools/libs/less/teambition-ui-variables.less',
'./tools/libs/less/teambition-ui-icons.less'
]
}
const stream = merge2(
gulp.src(paths.tbui)
.pipe(concat('tbui.less'))
.pipe(logError(less())),
gulp.src(paths.less)
.pipe(sourcemaps.init({
loadMaps: true
}))
.pipe(logError(less()))
.pipe(sourcemaps.write())
)
.pipe(sourcemaps.init({
loadMaps: true
}))
.pipe(concat('app.css'))
.pipe(autoprefixer({
browsers: ['last 2 versions']
}))
.pipe(sourcemaps.write())
.pipe(gulp.dest(`www/css/`))
return new Promise((resolve, reject) => {
stream.on('end', () => {
gutil.log(gutil.colors.yellow('complete less'))
resolve()
})
})
}
示例8: filter
gulp.task('default', () => {
const jsFilter = filter('**/*.js', {restore: true});
const lessFilter = filter('**/*.less', {restore: true});
return gulp.src('assets/**')
.pipe(jsFilter)
.pipe(concat('bundle.js'))
.pipe(jsFilter.restore)
.pipe(lessFilter)
.pipe(less())
.pipe(lessFilter.restore)
.pipe(gulp.dest('out/'));
});
示例9: function
gulp.task("less", function() {
return gulp.src(["./public/less/style.less"])
.pipe(less())
.pipe(cleanCSS())
.pipe(gulp.dest("./public/"));
});