Giter VIP home page Giter VIP logo

web-components's Introduction

介绍

基于Polymer的组件库。

立即开始

安装

  1. 安装 polymer-cli
npm install -g polymer-cli
  1. 安装npm依赖:
$ npm i
  1. 启动开发
$ npm start
  1. 访问 http://127.0.0.1:8081/demo/

构建

$ npm run build

测试

$ npm run test

开发步骤

  1. elements 目录中加入要开发的组件目录,命名与现有的保持一致。
  2. 参考 ox-button 的写法,将组件的css与js都写在同一个js文件中。
  3. 公共样式加入 elements/global.css 文件中。
  4. demo 目录中创建组件的示例html文件。
  5. 开发结束后,在根目录的 index.jsimport 新开发的组件。
  6. 如果需要构建项目,则执行构建命令。
  7. build/prod 目录中的 ox.min.cssox.min.js 就是最终需要引入的文件,可以在任意的项目中引入,然后就可以使用所有的组件了。

使用文档

组件详细文档请参考: API文档

资料

MDN Web components资料

Google Web components资料

Polymer 官方文档

基于Polymer的组件市场

基于Polymer的App布局组件

Polymer新手启动项目

web-components's People

Contributors

109km avatar 521wendy avatar wn107 avatar mamy808 avatar messi1991 avatar

Watchers

 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.