# fis-packager-rem

> fis3 对px单位的css属性自动转化为rem为单位的fis插件。基于rem的解决方案[rem-core](https://www.npmjs.com/package/rem-core)的二次开发。

Latest version **1.0.3** (published 2017-04-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install fis-packager-rem
pnpm add fis-packager-rem
yarn add fis-packager-rem
bun add fis-packager-rem
```

Provides the command `fis-packager-rem`.

## 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 | 1.0.3 |
| Published | 2017-04-29 |
| First published | 2017-03-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | xiechengxiong@foxmail.com |
| Maintainers | xiechengxiong |
| Keywords | rem |

## Links

- npm: https://www.npmjs.com/package/fis-packager-rem
- Repository: https://github.com/xiechengxiong/fis-packager-rem
- Homepage: https://github.com/xiechengxiong/fis-packager-rem#readme
- Issues: https://github.com/xiechengxiong/fis-packager-rem/issues
- npm.io page: https://npm.io/package/fis-packager-rem

## Dependencies (2)

- [css](https://npm.io/package/css.md) ^2.2.1
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.0

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2017-04-29
- 1.0.2 — 2017-03-20
- 1.0.1 — 2017-03-20
- 1.0.0 — 2017-03-20

## README

# fis-packager-rem

fis3 对px单位的css属性自动转化为rem为单位的fis插件。基于rem的解决方案[rem-core](https://www.npmjs.com/package/rem-core)的二次开发。

-----------------
    - 使用node-css把css解析后,对px为单位对属性进行rem转换处理。
    - 对文字进行特殊处理追加至产出的css文件之后。
    - developer只用专注开发,配置灵活方便, 对原始文件无侵入。
-----------------

## flexible.js
默认可以配合淘宝的[flexible.js](https://github.com/amfe/lib-flexible)使用

## fis配置

```javascript
fis.match('*.css', {
    parser: fis.plugin('rem', {
        dpr: 2,
        rem: 750,
        // 需要过滤的css样式属性关键字
        exclude: ['background-size'],
        // 需要过滤的css文件路径关键字
        excludeFile: ['common']
    })
})
```


## Usage

```css
body {
    border-top: 1px;
    border-bottom: 10px;
    padding: 10px; /* @norem */
    background-size: 10px 10px;
}
```

输出:

```css
body {
    border-top: 1px;
    border-bottom: 0.5557rem;
    padding: 10px;
    background-size: 0.5557rem 0.5557rem;
}
```

## changelog

<table>
    <thead>
        <tr>
            <th>版本</th>
            <th>类型</th>
            <th>说明</th>
        </tr>
    </thead>
    <tbody> 
        <tr>
            <td>v0.0.8</td>
            <td>Feature</td>
            <td>添加原始值</td>
        </tr>
        <tr>
            <td>v0.0.7</td>
            <td>Bugfixed</td>
            <td>全局选择器问题</td>
        </tr>
    </tbody>
</table>

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