cdn-buddy

Load JS and CSS from a source of your choosing.


Keywords
require, cdn, remote, requirejs
License
ISC
Install
npm install cdn-buddy@0.5.1

Documentation

cdn-buddy

Load JS and CSS from a CDN of your choosing. Supports requirejs config files.

Install

npm i --save cdn-buddy

Usage

const cdn = require('cdn-buddy')
cdn.config = require('./config.example.json')

(async function() {
  await cdn.require(['jquery', 'vue@2.6.11/dist/vue.js']) // async
  await cdn.require(['moment']) // defered

  // Your dependent code goes here
})()

@TODO

  • Better documentation
  • Better implementation of requirejs config support