Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yangjunlong/fis3-hook-browserify
https://github.com/yangjunlong/fis3-hook-browserify
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yangjunlong/fis3-hook-browserify
- Owner: yangjunlong
- License: mit
- Created: 2018-10-29T12:03:33.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-16T11:54:52.000Z (over 4 years ago)
- Last Synced: 2024-04-03T18:09:47.874Z (10 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fis3-hook-browserify
> a fis3 hook plugin for browserify
## usage
> 可以跨模块使用需要在当前模块下的fis-conf.js文件里配置如下信息:
```
fis.hook('browserify', {
// 通用模块目录路径,一般模块命名common
commonModulePath: __dirname + '/common',
// browserify文件存放路径
commonBrowserify: '/client/browserify/',
// 通用模块命名空间
commonModuleName: 'common'
});// 不需要再编译此目录下的js文件
fis.match('client/browserify/*.js', {
useCompile: false,
})
```## 示例
```
var querystring = require('querystring');
console.log(querystring);
```编译后代码如下:
```
var querystring = require('common:browserify/querystring.js');
console.log(querystring);
```
同时会在common模块下的`commonBrowserify`路径生成browserify文件:`querystring.js`