Git Product home page Git Product logo

polymer-demo's Introduction

Differential Polymer Demo

AS SEEN ON THE YOUTUBES

Installation

  1. Clone the repository git clone https://github.com/Differential/polymer-demo
  2. From the root directory of the meteor app, run bower install
  • This will install Polymer, web components, & vulcanize
  • Also, includes some custom elements we made so you can see how that works
  1. Start the Meteor server meteor
  2. WEB COMPONENTS!

Important concepts:

Including webcomponents.js

In the client/templates/layout/head.html file, there is a line that looks like this:

<script src="/components/webcomponentsjs/webcomponents.js"></script>

This is very important because it includes the web components polyfill.

imports.html

  • This is where you list what Polymer components you want to load, from polymer core, paper-elements, and even your own custom components. We put these tags in a specific file client/templates/layout/imports.html which is then compiled with Vulcanize and the differential-vulcanize package to concatenate the web components into one file.

  • After running bower install, your components will placed into the public/components directory, which you can see in the .bowerrc file

  • There are customized polymer overrides in the client/stylesheets/components folder

Deploying to production

  • Run your production deploy command with a VULCANIZE=true environment variable. i.e.. VULCANIZE=true modulus deploy

polymer-demo's People

Contributors

davidmh avatar rgoomar avatar ryw avatar spencercarli avatar

Watchers

 avatar  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.