代码拉取完成,页面将自动刷新
同步操作将从 sinceow/LunarCalendar 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
var gulp = require("gulp");
var sass = require("gulp-sass");
var minify = require("gulp-minify-css");
var uglify = require("gulp-uglify");
var concat = require("gulp-concat");
var bower = require("gulp-bower");
var watch = require("gulp-watch");
var del = require("del");
var rename = require("gulp-rename");
var plumber = require("gulp-plumber");
var react = require("gulp-react");
var eventstream = require("event-stream");
var browserify = require("gulp-browserify");
var concatcss = require("gulp-concat-css");
var cssurladjuster = require("gulp-css-url-adjuster");
var jasmine = require("gulp-jasmine");
var jasreporter = require("jasmine-reporters");
var mainbowerfiles = require("main-bower-files");
var filter = require("gulp-filter");
var config = {
"js": [
"bower/materialize/dist/js/materialize.js",
"bower/json3/lib/json3.js",
"bower/hammerjs/hammer.js"
],
"css": [
"bower/animate.css/animate.css"
]
};
gulp.task("default", function () {
gulp.start("scss", "js");
gulp.watch(["./sass/*.scss", "./sass/**/*.scss"], ["scss"]);
gulp.watch(["./react/*.js", "./react/**/*.js", "./src/*.js"], ["js"]);
console.log("Watching scss...");
console.log("Watching js...");
});
gulp.task("test", function () {
gulp.src(["./react/__tests__/*.js"])
.pipe(jasmine({
verbose:true,
includeStackTrace: true,
reporter: new jasreporter.TerminalReporter()
}));
});
gulp.task("bower", function(){
bower();
});
gulp.task("scss", function () {
var scss_stream = gulp.src(["./sass/*.scss", "./sass/**/*.scss"])
.pipe(plumber(function (error) {
console.log(error.toString());
this.emit("end");
}))
.pipe(sass())
.pipe(gulp.dest("build"));
var css_stream = gulp.src(config.css);
eventstream.merge(css_stream, scss_stream)
.pipe(concatcss("bundle.css"))
.pipe(cssurladjuster({
replace: ["../fonts/", "../font/"]
})).pipe(cssurladjuster({
replace: ["../../font/", "../font/"]
}))
.pipe(minify())
.pipe(rename("bundle.min.css"))
.pipe(gulp.dest("build"));
});
gulp.task("js", function () {
var react_stream = gulp.src("./react/app.js")
.pipe(plumber(function (error) {
console.log(error.toString());
this.emit("end");
}))
.pipe(browserify({
"transform": [
["reactify", {
"es6": true
}]
]
}))
.pipe(gulp.dest("build"));
var js_stream = gulp.src(config.js);
eventstream.merge(js_stream, react_stream)
.pipe(concat("bundle.js"))
.pipe(gulp.dest("build"))
.pipe(rename("bundle.min.js"))
.pipe(gulp.dest("build"));
});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。