在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):assemble/gulp-assemble开源软件地址(OpenSource Url):https://github.com/assemble/gulp-assemble开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):Heads up!This project has been deprecated. Assemble can be used directly with or without gulp. ExamplesAssemble with gulp var gulp = require('gulp');
var htmlmin = require('gulp-htmlmin');
var extname = require('gulp-extname');
var assemble = require('assemble');
var app = assemble();
gulp.task('load', function(cb) {
app.partials('templates/partials/*.hbs');
app.layouts('templates/layouts/*.hbs');
app.pages('templates/pages/*.hbs');
cb();
});
gulp.task('assemble', ['load'], function() {
return app.toStream('pages')
.pipe(app.renderFile())
.pipe(htmlmin())
.pipe(extname())
.pipe(app.dest('site'));
});
gulp.task('default', ['assemble']); Assemble without gulp var htmlmin = require('gulp-htmlmin');
var extname = require('gulp-extname');
var assemble = require('assemble');
var app = assemble();
app.task('load', function(cb) {
app.partials('templates/partials/*.hbs');
app.layouts('templates/layouts/*.hbs');
app.pages('templates/pages/*.hbs');
cb();
});
app.task('assemble', ['load'], function() {
return app.toStream('pages')
.pipe(app.renderFile())
.pipe(htmlmin())
.pipe(extname())
.pipe(app.dest('site'));
});
app.task('default', ['assemble']); |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论