1.3.0 • Published 2 years ago
shimly v1.3.0
Shimly
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()andJSON.parse()- Douglas Crockford's JSON 2) - localStorage (
Window.localStorageandWindow.sessionStoragepolyfill 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 shimlyAPI:
shimly.shim(shims, minify, destination); //create shim set
shimly.list(); //lists available shimsUsage:
// ...
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 fileshimly -m -o file.js -s Array.every,JSON