1 Star 0 Fork 0

laoha0201/react

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gulpfile.js 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
chico 提交于 2015-11-12 16:02 . update deps
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict';
var gulp = require('gulp');
var babel = require('gulp-babel');
var flatten = require('gulp-flatten');
var del = require('del');
var babelPluginDEV = require('fbjs-scripts/babel/dev-expression');
var babelPluginModules = require('fbjs-scripts/babel/rewrite-modules');
var paths = {
react: {
src: [
'src/**/*.js',
'!src/**/__tests__/**/*.js',
'!src/**/__mocks__/**/*.js',
],
lib: 'build/modules',
},
};
var babelOpts = {
nonStandard: true,
blacklist: [
'spec.functionName',
],
optional: [
'es7.trailingFunctionCommas',
],
plugins: [babelPluginDEV, babelPluginModules],
ignore: ['third_party'],
_moduleMap: require('fbjs/module-map'),
};
gulp.task('react:clean', function() {
return del([paths.react.lib]);
});
gulp.task('react:modules', function() {
return gulp
.src(paths.react.src)
.pipe(babel(babelOpts))
.pipe(flatten())
.pipe(gulp.dest(paths.react.lib));
});
gulp.task('default', ['react:modules']);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/laoha0201/react.git
git@gitee.com:laoha0201/react.git
laoha0201
react
react
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385