Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/microappjs/plugin-compatible
[Plugin] Compatible adaptation
https://github.com/microappjs/plugin-compatible
Last synced: about 2 months ago
JSON representation
[Plugin] Compatible adaptation
- Host: GitHub
- URL: https://github.com/microappjs/plugin-compatible
- Owner: MicroAppJS
- License: mit
- Created: 2020-01-21T12:34:34.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T05:28:51.000Z (about 2 years ago)
- Last Synced: 2024-12-08T17:18:33.124Z (about 2 months ago)
- Language: JavaScript
- Size: 2.14 MB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Micro APP Plugin - Compatible
[Plugin] compatible plugin.
针对于跨版本升级的兼容性方案. 用于 `@micro-app/cli` 的插件.
[![Github Actions Coveralls][Github-Actions-Coveralls]][Github-Actions-Coveralls-url]
[![Coverage Status][Coverage-img]][Coverage-url]
[![NPM Version][npm-img]][npm-url]
[![NPM Download][download-img]][download-url][Github-Actions-Coveralls]: https://github.com/MicroAppJS/plugin-compatible/workflows/Coveralls/badge.svg
[Github-Actions-Coveralls-url]: https://github.com/MicroAppJS/plugin-compatible
[Coverage-img]: https://coveralls.io/repos/github/MicroAppJS/plugin-compatible/badge.svg?branch=master
[Coverage-url]: https://coveralls.io/github/MicroAppJS/plugin-compatible?branch=master
[npm-img]: https://img.shields.io/npm/v/@micro-app/plugin-compatible.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-app/plugin-compatible
[download-img]: https://img.shields.io/npm/dm/@micro-app/plugin-compatible.svg?style=flat-square
[download-url]: https://npmjs.org/package/@micro-app/plugin-compatible## Install
```sh
yarn add @micro-app/plugin-compatible
```or
```sh
npm install -S @micro-app/plugin-compatible
```## Usage
### 在项目 `根目录` 的 `micro-app.config.js` 文件中配置
```js
module.exports = {
// ...plugins: [ // 自定义插件
['@micro-app/plugin-compatible', {
version: 'v1', // default: 'v1'
server: false, // default: true
}],
],
};
```## Details
### v1
`v1` 版本兼容 `0.2.x` 版本配置,支持内置 `koa` 服务。
```js
// options
{
version: 'v1', // default: 'v1'
server: false, // default: true
}
```### Options
#### version
版本切换
- type: `string`,
- default: `v1`#### server
是否启用内置服务。
- type: `boolean`,
- default: `true`