shimly

1.3.0 • Public • Published

Shimly

npm npm package minimized gzipped size Downloads

Create a JavaScript shim set using node.

List of shims:

  • Array.isArray (Array.isArray() - MDN)
  • Array.every (Array.prototype.every() - MDN)
  • Array.filter (Array.prototype.filter() - MDN)
  • Array.forEach (Array.prototype.forEach() - MDN)
  • Array.indexOf (Array.prototype.indexOf() - MDN)
  • Array.map (Array.prototype.map() - MDN)
  • Array.reduce (Array.prototype.reduce() - MDN)
  • Array.some (Array.prototype.some() - MDN)
  • Element.classList (Element.classList - Eli Grey's classList.js)
  • Fetch API (fetch()Github polyfill)
  • Function.bind (Function.prototype.bind() -MDN)
  • Object.assign (Object.assign() - MDN)
  • JSON (JSON.stringify() and JSON.parse() - Douglas Crockford's JSON 2)
  • localStorage (Window.localStorage and Window.sessionStorage polyfill via cookies - Remy Sharp's Gist)
  • requestAnimationFrame (Window.requestAnimationFrame() polyfill Paul Irish's Gist)
  • EventListener (EventListener polyfill – Jonathan Neal)
  • Document.getElementsByClassName (getElementsByClassName polyfill – SitePoint)
  • String.trim (String.prototype.trim()MDN)
  • matchMedia (matchMedia()MDN)

Install:

$ npm install shimly

API:

shimly.shim(shims, minify, destination); //create shim set
shimly.list(); //lists available shims

Usage:

// ...
var shimly = require('shimly')

shimly.shim(['Array.every', 'Array.forEach'], false, 'shims.js');
// ...

CLI

Usage: shimly [options]

Options:

  -h, --help            output usage information
  -V, --version         output the version number
  -m, --minify          Minify
  -s, --shims <items>   Add the specified shims, comma separted
  -o, --output [value]  Output file
shimly -m -o file.js -s Array.every,JSON

Readme

Keywords

Package Sidebar

Install

npm i shimly

Weekly Downloads

3

Version

1.3.0

License

ISC

Unpacked Size

66.2 kB

Total Files

24

Last publish

Collaborators

  • nicbell