srilinka
v0.0.2
Published
Generate SRI links for npm resources thru a CDN.
Downloads
4
Readme
srilinka
Generate SRI links for npm resources thru a CDN.
Install
$ npm install --save srilinka
Example
'use strict'
// self
const { srilinka, supportedTypes, supportedCdns } = require('.')
const packages = ['vega', 'vega-lite', 'vega-embed', 'vega-tooltip']
const cdn = 'unpkg'
console.error('Supported types:', supportedTypes.join(', '))
console.error('Supported CDNs:', supportedCdns.join(', '))
console.error(`Linking to latest ${packages.join(', ')} on ${cdn}.`)
srilinka({ packages, cdn })
.then((output) => console.log(JSON.stringify(output)))
.catch(console.error)
License
© 2018 Robin Millette