@marsjs/components

mars components for h5 target

Usage no npm install needed!

<script type="module">
  import marsjsComponents from 'https://cdn.skypack.dev/@marsjs/components';
</script>

README

mars-components

环境依赖

  • php v5.6+
  • node v8+

Get Started

组件库代码库:http://icode.baidu.com/repo/baidu%2Fps-se-fe-tpl%2Fsearch-ui/files/master/tree/

npm install
apmjs install

本地开发

npm run serve -- [options] [组件...]
  Options:

    --open    open browser on server start
    --copy    copy url to clipboard on server start
    --host    specify host (default: 0.0.0.0)
    --port    specify port (default: 8080)
    --https   use https (default: false)
    --public  specify the public network URL for the HMR client

windows 下运行时执行会报错,可以暂时吧 node_modues/@baidu/atom-web-server-runtime/php/Atom_Component_Creator.php 中第 34 行的 $componentPath[0] === DIRECTORY_SEPARATOR && 这段代码删掉

文档自动生成

执行

npm run docs

文档书写参考:http://icode.baidu.com/repos/baidu/atom/atom-docgen-api/tree/master

注意:

  1. 该命令会删除 readme.md 内 API 之后的所有内容
  2. 暂时需要在 build/gendoc.js 内添加白名单