1.3.0 • Published 2 years ago

shimly v1.3.0

Weekly downloads
38
License
ISC
Repository
-
Last release
2 years ago

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
1.3.0

2 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago