Giter VIP home page Giter VIP logo

mip-extensions's Introduction

MIP 组件

MIP 组件包括官方组件和开发者自定义组件,是用于定制站点页面功能的利器。

组件编译

  • 安装依赖

     npm install
    
  • 执行编译

    组件编译集成了 mip-extension-optimizer 工具,并通过 npm script 命令提供出来,如:

     npm run build
    
  • 指定参数

    如果需要指定编译参数(参数使用与 mip-extension-optimizer 一致),以 -- 分割,如指定输出目录和需编译的个别组件:

     npm run build -- -o output mip-form mip-access
    

脚本引用

使用该仓库下的组件前,需在页面中引入组件对应脚本。

  • 格式

     https://c.mipcdn.com/static/v1/{组件名}/{组件名}.js
    
  • 示例

     <script async src="https://c.mipcdn.com/static/v1/mip-form/mip-form.js"></script>
    

组件预览

组件的预览支持两种方式,具体如下:

  • 页面预览

    将当前开发的脚本引用到示例页面,并通过 mip cli 开启本地服务,预览页面功能。该方法需要开发者构建预览所需的 MIP 页面。具体可以参考官方博客中的MIP-CLI工具调试组件文档。

  • README 预览

    通过在 README 中书写 html,并借助 mip cli 来预览效果。该方法会抓取 README 中预览所需 html 来达成预览效果。具体细节可参考调试 MIP 扩展组件文档。

组件相关资料

mip-extensions's People

Contributors

wupengfex avatar jennyliang220 avatar hejieye avatar it-cnz avatar dongshihao avatar leaqi avatar smileu avatar antcss avatar wuhanfeiyou avatar momofan avatar gkrace avatar pifire avatar erik168 avatar weiling0626 avatar 360doc avatar lixkoo avatar bjwangbin avatar ginaqing avatar laoono avatar xuexb avatar elang126 avatar selfsalty avatar mimipigs avatar linweitian515 avatar alan110 avatar yoyoyoo avatar amadalijun avatar jfdsies avatar hasyang5 avatar schoeu avatar

Watchers

James Cloos avatar starwind avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.