Skip to content

A simple, lightweight utility library to lazy load a JavaScript or CSS dependency.

License

Notifications You must be signed in to change notification settings

jzhobes/include

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

include

A simple, lightweight utility library to lazy load a JavaScript or CSS dependency.

Usage

const include = require('@mountaingapsolutions/include');

include('//code.jquery.com/jquery-3.4.1.slim.min.js').then(() => {
    $('.container').append('<div>Hello World</div>');
});

include('//stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.cs', '//stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js').then(() => {
    // Bootstrap and its stylesheet loaded.
});

About

A simple, lightweight utility library to lazy load a JavaScript or CSS dependency.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published