@miniu/plugin-dev
TypeScript icon, indicating that this package has built-in type declarations

1.21.3-aliyun.0 • Public • Published

Badges

Build status Line coverage Branch coverage TNPM version TNPM downloads


@miniu/plugin-dev

dev插件

export namespace ISlotDev {
  export interface List extends ISlot {
    name: 'dev.list';
    val: () => void;
  }

  export interface InjectRenderer extends ISlot {
    name: 'dev.injectRenderer';
    val: string;
  }
}

示例:

export default ({ add }) => {
  add('dev.list', () => {
    console.log('dev test')
  })
}
$ miniu dev

$ test test
export default ({ add }) => {
  add('dev.injectRenderer', 'alert(1)');
}
$ miniu dev

访问页面模拟器会 alert

dev.injectRenderer 可为 js 字符串,也可为 http url

Readme

Keywords

none

Package Sidebar

Install

npm i @miniu/plugin-dev

Weekly Downloads

14

Version

1.21.3-aliyun.0

License

none

Unpacked Size

915 kB

Total Files

32

Last publish

Collaborators

  • minicode-group
  • zinkey
  • candy.zheng