Skip to content

Commit

Permalink
清理es、esx后缀文件的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
asoiso committed Jun 22, 2017
1 parent b69c00f commit 758ffab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
## 0.1.0 / 2017-06-18
* init

## 0.2.0 / 2017-06-18
* 清理es、esx后缀文件的支持
13 changes: 5 additions & 8 deletions lib/config/webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module.exports = function (config) {
// });

// script
fis.match('*.{js,jsx,es,ts,tsx}', {
fis.match('*.{js,jsx,ts,tsx}', {
rExt: '.js',
useHash: true,
preprocessor: [
Expand All @@ -112,7 +112,7 @@ module.exports = function (config) {
});

// 匹配所有javaScript文件
fis.match('*.{js,jsx,es}', {
fis.match('*.{js,jsx}', {
//useSameNameRequire: true,
// 解析es6, jsx babel-5.x babelx-5.x babel-core
// parser: fis.plugin('typescript'),
Expand Down Expand Up @@ -144,21 +144,18 @@ module.exports = function (config) {
// package.main || index.js
// var antd = require('antd')
// => node_modules/antd/{package.main}.js | node_modules/antd/index.js
fis.match('/node_modules/(**)(.js)', {
fis.match('/node_modules/(**).js', {
// id支持简写,去掉modules和.js后缀中间的部分
id: '$1',

isMod: true,

useSameNameRequire: true,

// 生态的js不做编译
parser: null,

// 生态的js不做文件处理
preprocessor: null
});

// 生态模块中的资源发布到lib目录
fis.match('/node_modules/(**)', {
release: '${project.statics}/lib/$1'
});
Expand All @@ -167,7 +164,7 @@ module.exports = function (config) {
// subpath.js || subpath/index.js || subpath/subpath.js
// require('../home') => ../home/index.js | ../home/home.js
// require('/modules/abc'); 全路径
fis.match('/{app,module}/(**).{js,jsx,es,ts,tsx}', {
fis.match('/{app,module}/(**).{js,jsx,ts,tsx}', {
// id支持简写,去掉modules和.js后缀中间的部分
id: '$1',
// 标记文件为组件化文件。被标记成组件化的文件会入map.json表。并且会对js文件进行组件化包装。
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "efit",
"version": "0.1.0",
"version": "0.2.0",
"description": "易上手的前端构建工具,基于 fis3,面向业务项目,支持simple、webpage、webapp三种模式。",
"main": "index.js",
"bin": {
Expand Down

0 comments on commit 758ffab

Please sign in to comment.