Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including generator-polymer-init-d2l-polymer-3-element with all npm packages installed. Try it out:

generator-polymer-init-d2l-polymer-3-element lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("generator-polymer-init-d2l-polymer-3-element/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

generator-polymer-init-d2l-polymer-3-element v0.0.1

Template for creating BrightspaceUI Polymer 3 elements


NPM version Build status Dependency Status

Template for creating BrightspaceUI Polymer 3 elements.

With the template, you get:

  • Project boilerplate including: .editorconfig, .gitignore, package.json, polymer.json, CODEOWNERS and LICENSE (Apache-2.0)
  • A basic Polymer 3 element scaffold
  • Demo page for the element
  • Test page for the element
  • Travis CI ready-to-go
  • Local tests that do linting using ESLint, polymer lint and unit tests using Chrome headless
  • Cross-browser testing from Travis CI using Sauce Labs


Assuming you have Node.js already, install polymer-cli and the polymer-3 element generator globally:

npm install -g polymer-cli
npm install -g generator-polymer-init-d2l-polymer-3-element

In an empty project directory, run the CLI's init command:

mkdir my-element
cd my-element
polymer init

Choose d2l-polymer-3-element from the list and follow the prompts.

Alternately, you can jump right into the wizard:

polymer init d2l-polymer-3-element

That's it! Follow the instructions in the README to learn how to get a local development server running and run the tests.

Sauce Labs

To do cross-browser testing using Sauce Labs, the API key needs to be encrypted into the .travis.yml file.

To learn more about how to set this up, see the Testing section of The Guide.

Developing and Contributing

Pull requests welcome!

After cloning the repo, install dependencies: npm install.

To run unit tests: npm test

Running the generator locally

To avoid having to publish to NPM just to test out your local changes, you can run a local copy.

First, from the root of the generator-polymer-init-d2l-polymer-3-element, run: npm link

That's pretty much it. Now create a new empty project to try it out and run polymer init. Choosing the generator from the list should run your local code.

Publishing to NPM

Publishing happens automatically from Travis CI whenever there's a tagged commit. The easiest way to kick that off is through GitHub's "Releases" tab.

Just make sure you've incremented the version in package.json.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free