Giter VIP home page Giter VIP logo

meteor-vulcanize's Introduction

Vulcanize

Warning: API Change for version 1.0.0.

This package a meteor build plugin that wraps the vulcanize npm package, which is used to process web components into a single output file.

Usage

  1. Ensure all your components are located somewhere under your public directory. (via bower, zip, etc)
  2. Include a config.vulcanize file in the root of your project. This file will optionally define a path to the polyfill and paths to html imports for your components. For Example:
{
    "polyfill": "/bower_components/webcomponentsjs/webcomponents.min.js",
    "useShadowDom": true, // optional, defaults to shady dom (polymer default)
    "imports": [
        "/bower_components/paper-button/paper-button.html",
        "/bower_components/paper-checkbox/paper-checkbox.html"
    ]
}
  • By specifying a path to the polyfill we can ensure that it is injected into the bundle before any imports.

  • By setting useShadowDom to true, we configure polymer to opt out of shady dom and use full shadow dom. This is pretty much required at the moment unless you only use polymer elements as leaf nodes. Any light dom (child elements) that gets rendered by blaze, react, etc will not be accounted for otherwise.

  • Running your app in development as usual will result in individual imports being added to your <head> tag, resulting in multiple subsequent HTTP requests (good in development - debugging).

  • Running meteor, meteor build, modulus deploy, etc with the VULCANIZE=true environment variable set will result in all your html imports being vulcanized or concatenated into a single html import (good in production). The resulting file will be called vulcanized-{md5}.html, which will be automatically added to your <head> tag. For example, VULCANIZE=true meteor, VULCANIZE=true modulus deploy.

  • Setting the CDN_PREFIX environment variable will prepend the string to the beginning of the file path that is inserted into your HTML's <head> tag.

meteor-vulcanize's People

Contributors

alexiri avatar atoy40 avatar engelgabriel avatar mklftn avatar rodrigok avatar ryw avatar thaumrystra 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.