代码拉取完成,页面将自动刷新
同步操作将从 mirrors_behavior3/behavior3js 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var yuidoc = require('gulp-yuidoc');
// var jsdoc = require('gulp-jsdoc');
var zip = require('gulp-zip');
var babelify = require('babelify');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var info = require('./package.json');
var NAME = 'behavior3-'+info.version;
/**
* Apply jshint to the source and print results on terminal.
*/
gulp.task('_jshint', function() {
return gulp.src(['src/b3.js', 'src/**/*.js'])
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('_build', function() {
return browserify('./src/index.js', {standalone: 'b3'})
.transform(babelify, {
presets: ['es2015']
})
.transform('uglifyify')
.bundle()
.pipe(source('bundled-app.js'))
.pipe(buffer())
.pipe(rename(NAME+'.js'))
.pipe(gulp.dest('./libs'));
});
/**
* Generate YUIDOCS
*/
gulp.task('_docs', function() {
var OPTS = {
'themedir': 'docs/theme',
'helpers': ['docs/theme/helpers.js'],
}
return gulp.src(['src/b3.js', 'src/**/*.js'])
.pipe(yuidoc(OPTS, OPTS))
.pipe(gulp.dest('./docs/'+NAME))
.pipe(zip(NAME+'.docs.zip'))
.pipe(gulp.dest('./docs/'))
});
//
gulp.task('dev', function() {
gulp.watch('src/**/*.js', ['_jshint']);
})
gulp.task('build', ['_build', '_docs']);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。