# fis-postprocessor-jswrapper

> A postprocessor plugin for fis to wrap javascript with closure or amd define.

Latest version **0.0.14** (published 2015-11-03) · 0 weekly downloads

## Install

```sh
npm install fis-postprocessor-jswrapper
pnpm add fis-postprocessor-jswrapper
yarn add fis-postprocessor-jswrapper
bun add fis-postprocessor-jswrapper
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.14 |
| Published | 2015-11-03 |
| First published | 2013-05-27 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | FIS Team |
| Maintainers | fouber, fis-dev, 2betop, hefangshi |
| Keywords | fis |

## Links

- npm: https://www.npmjs.com/package/fis-postprocessor-jswrapper
- Repository: https://github.com/fis-dev/fis-postprocessor-jswrapper
- Homepage: http://fis.baidu.com/
- Issues: https://github.com/fis-dev/fis-postprocessor-jswrapper/issues
- npm.io page: https://npm.io/package/fis-postprocessor-jswrapper

## Recent versions

- 0.0.14 (latest) — 2015-11-03
- 0.0.13 — 2015-11-02
- 0.0.12 — 2015-05-13
- 0.0.11 — 2015-05-05
- 0.0.10 — 2015-03-19
- 0.0.9 — 2015-01-14
- 0.0.8 — 2013-10-31
- 0.0.7 — 2013-10-31
- 0.0.6 — 2013-09-17
- 0.0.5 — 2013-08-15
- 0.0.4 — 2013-06-09
- 0.0.3 — 2013-05-30
- 0.0.2 — 2013-05-27
- 0.0.1 — 2013-05-27

## README

# fis-postprocessor-jswrapper

A postprocessor plugin for fis to wrap javascript with closure or amd define.



## settings

    $ vi path/to/project/fis-conf.js

```javascript
fis.config.merge({
    settings : {
        postprocessor : {
            jswrapper : {
                //wrap type. if omitted, it will wrap js file with '(function(){...})();'.
                type : 'amd',
                //you can use template also, ${content} means the file content
                //template : '!function(){${content}}();',
                //wrap all js file, default is false, wrap modular js file only.
                wrapAll : true
            }
        }
    }
});
```

或者通过 roadmap.path 局部配置

```
fis.config.set('roadmap.path', [
    {
        reg: '/page/**.js',
        jswrapper: {
            //wrap type. if omitted, it will wrap js file with '(function(){...})();'.
            type : 'amd',

            //you can use template also, ${content} means the file content
            //template : '!function(){${content}}();'
        }
    }
]);
```

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