Skip to content

Hypercubed/systemjs-plugin-html

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

systemjs-plugin-html

Bridging the gap between SystemJS (Universal dynamic module loader) and HTML imports. Load HTML imports via SystemJS, include SystemJS modules (ES6, AMD, CommonJS) in HTML Imports, building using vulcanize via jspm and SystemJS builder.

Watch out: This project is an experiment. The HTML imports specification is still in flux and SystemJS is still new.

Build Status

Install

jspm install html=github:Hypercubed/systemjs-plugin-html

Basic usage

import './dom-element.html!'

The html file is imported as an HTML import. The webcomponent.js polyfills may be required in browsers that lack native support. The code above is equivalent to:

<link rel="import" href="./dom-element.html">

See examples in the test folder

Bundling

Bundling of html files is done using Vulcanize. When bundling an build.html will be created along side the build.js file. You can disable html imports bundling by setting System.buildHTML = false.

Tests

Testing using karma:

karma start

or use http-server and navigate to http://localhost:8080/test/

Tested with:

  • JSPM v0.15.7
  • SystemJS v0.16.11

Tested in:

  • Chrome Version 43.0.2357.132 m
  • IE 11.0.9600
  • Firefox 39.0
  • Firefox 41.0a2

License

MIT