New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

storm-component-boilerplate

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storm-component-boilerplate

This is a **boilerplate for developing UI components** by **StormId**, used in production in conjunction with our project scaffold.

  • 0.2.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-76.92%
Maintainers
1
Weekly downloads
 
Created
Source

This is a boilerplate for developing UI components by StormId, used in production in conjunction with our project scaffold.

It includes an opinionated JS component boilerplate, build system, test integration, example, README (see below), and deployment, using nodeJS, npm, gulp, mocha, shouldjs, instanbul, babel, travis ci, and codecov.

Before use make sure to grep for “storm-component-boilerplate” and replace every occurrence as well as updating your tests, readme and example.


#Component Name

Build Status codecov.io npm version

One line summary

##Usage HTML

<div class="js-boilerplate"></div>

JS

npm i -S storm-component-boilerplate

either using es6 import

import Boilerplate from 'storm-component-boilerplate';

Boilerplate.init('.js-selector');

aynchronous browser loading (use the .standalone version in the /dist folder)

import Load from 'storm-load';

Load('/content/js/async/storm-component-boilerplate.standalone.js')
    .then(() => {
        StormComponentBoilerplate.init('.js-component-boilerplate');
    });

or es5 commonjs (legacy, use the .standalone version in the /dist folder)

var Boilerplate = require('./libs/storm-component-boilerplate');

Boilerplate.init('.js-selector');

##Example https://mjbp.github.io/storm-component-boilerplate

##Options

    {
        delay: 200,
        callback: null
    }

e.g.

Boilerplate.init('.js-selector', {
    callback(){
        console.log(this);
    }
});

##API ####Boilerplate.init(selector, opts) Initialise the module with a DOM selector and options object

####Boilerplate.handleClick() Trigger click event handler

##Tests

npm run test

##Browser support This is module has both es6 and es5 distributions. The es6 version should be used in a workflow that transpiles.

The es5 version depends unpon Object.assign, element.classList, and Promises so all evergreen browsers are supported out of the box, ie9+ is supported with polyfills. ie8+ will work with even more polyfils for Array functions and eventListeners.

##Dependencies None

##License MIT

Keywords

FAQs

Package last updated on 29 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc