# fis-zoo

> A front-end module solution with modjs based on fis

Latest version **2.4.2** (published 2017-01-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install fis-zoo
pnpm add fis-zoo
yarn add fis-zoo
bun add fis-zoo
```

Provides the commands `zoo`, `fis-zoo`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.4.2 |
| Published | 2017-01-03 |
| First published | 2015-03-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 25 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | zooble |
| Maintainers | zooble, rsk |
| Keywords | fis, fis-zoo |

## Links

- npm: https://www.npmjs.com/package/fis-zoo
- Repository: https://github.com/xwenliang/fis-zoo
- Issues: https://github.com/xwenliang/fis-zoo/issues
- npm.io page: https://npm.io/package/fis-zoo

## Dependencies (25)

- [colors](https://npm.io/package/colors.md) 0.6.2
- [commander](https://npm.io/package/commander.md) 1.3.2
- [zoo-kernel](https://npm.io/package/zoo-kernel.md) 1.2.0
- [fis-deploy-ftp](https://npm.io/package/fis-deploy-ftp.md) 0.0.2
- [fis-parser-utc](https://npm.io/package/fis-parser-utc.md) 0.0.2
- [fis-lint-jshint](https://npm.io/package/fis-lint-jshint.md) 0.0.4
- [fis-parser-less](https://npm.io/package/fis-parser-less.md) 0.1.0
- [zoo-packager-map](https://npm.io/package/zoo-packager-map.md) 0.0.1
- [zoo-parser-babel](https://npm.io/package/zoo-parser-babel.md) ^1.0.2
- [fis-command-server](https://npm.io/package/fis-command-server.md) 0.7.7
- [fis-deploy-default](https://npm.io/package/fis-deploy-default.md) 0.0.5
- [fis-command-release](https://npm.io/package/fis-command-release.md) 0.11.6
- [zoo-command-install](https://npm.io/package/zoo-command-install.md) 2.0.7
- [fis-spriter-csssprites](https://npm.io/package/fis-spriter-csssprites.md) 0.3.5
- [fis-optimizer-clean-css](https://npm.io/package/fis-optimizer-clean-css.md) 0.0.9
- [fis-optimizer-uglify-js](https://npm.io/package/fis-optimizer-uglify-js.md) 0.1.2
- [fis-prepackager-derived](https://npm.io/package/fis-prepackager-derived.md) 0.0.3
- [zoo-postpackager-simple](https://npm.io/package/zoo-postpackager-simple.md) 0.0.1
- [zoo-postpackager-autoload](https://npm.io/package/zoo-postpackager-autoload.md) 1.3.1
- [fis-postprocessor-jswrapper](https://npm.io/package/fis-postprocessor-jswrapper.md) 0.0.8
- [fis-preprocessor-components](https://npm.io/package/fis-preprocessor-components.md) 1.0.15
- [zoo-optimizer-html-minifier](https://npm.io/package/zoo-optimizer-html-minifier.md) 0.1.2
- [zoo-optimizer-png-compressor](https://npm.io/package/zoo-optimizer-png-compressor.md) 0.1.0
- [fis-postprocessor-autoprefixer](https://npm.io/package/fis-postprocessor-autoprefixer.md) 0.0.5
- [fis-postprocessor-require-async](https://npm.io/package/fis-postprocessor-require-async.md) 0.0.8

## Recent versions

- 2.4.2 (latest) — 2017-01-03
- 2.4.1 — 2016-06-16
- 2.4.0 — 2016-06-15
- 2.3.0 — 2016-06-14
- 2.2.7 — 2016-04-14
- 2.2.6 — 2016-04-14
- 2.2.5 — 2016-04-14
- 2.2.4 — 2016-04-14
- 2.2.3 — 2016-04-14
- 2.2.2 — 2016-04-13
- 2.2.1 — 2016-04-13
- 2.2.0 — 2016-04-13
- 2.1.4 — 2016-03-08
- 2.1.3 — 2015-11-08
- 2.1.2 — 2015-11-04
- … 28 more at https://npm.io/package/fis-zoo/versions

## README

#fis-zoo
基于FIS的前端模块化解决方案，根据自己团队的需求，优化改造了一些功能。  

![version](https://img.shields.io/npm/v/fis-zoo.svg?style=flat-square)

####使用方法：
安装：`npm install fis-zoo -g`  
使用：`fis-zoo release` 或 `zoo release` 参数同FIS

####优化改造列表：
1. 支持release到相对目录，需要如下配置：  
`fis.config.set('roadmap.relative', true);`

2. 默认引入了一些常用的依赖和模块配置  
引入的依赖和模块配置可在入口文件index.js中看到

3. 之前老版本的fis没有对模块中的css做特殊的处理，采用的方案是如果这个模块被引用了，那么会给所有的页面默认注入这个模块的css文件（如果有的话）。  
我们将之优化为只有引入这个模块的页面才注入该模块的css文件。（依然没有兼容异步模式，只要引入，不管同步异步，都会提前注入这个模块的css文件）

4. 做了node4.0版本的兼容

5. 修复了动态模块编译时候的warn  
如：`[NOTIC] can't find async resource ['ace/mode/'+opt.language]`

6. 做了适合自己团队使用的zoo-install  
在项目根目录创建zoo.json，执行`zoo install`，即可生成基础的fis-conf.js并安装zoo.json中声明依赖的模块
如：  
```
	//zoo.json，具体使用时请去掉注释，否则会json解析报错
	{
		"name": "example",//项目名称
		"downloadDirName": "modules",//模块安装目录
		"components": ["Zepto", "mo", "mod", "preload", "scrollPageCube"]//项目依赖的模块
	}
```

7. `v2.3.0`新增了css的autoprefixer  
8. `v2.4.1`新增了babel，默认支持`es2015`的编译，需要做如下配置：
```javascript
    roadmap: {
        path: [
            {
                reg: /^\/modules\/([^\/]+)\/(?:[^\/]+)\.js$/i,
                isMod: true,
                id: '$1',
                //开启下面这条配置
                isES6: true
            }
        ]
    }
```

####文档说明

- 支持其他拓展名的模板直接渲染，如 `.phtml`  
首先执行`zoo server start`  
然后执行`zoo server open`  
打开目录后，找到`www/node_modules/express/node_modules/send/node_modules/mime/types/mime.types`文件  
搜索`text/html`，找到`text/html html htm`在`htm`之后添加`phtml`  
然后执行`zoo server stop && zoo server start`即可(后期会融合到zoo install中)


####todo

1.  __inline引入html模板的时候，不支持传入自定义数据。

---
_Source: https://npm.io/package/fis-zoo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
