Skip to content

bricss/dopant

Repository files navigation

The aerogel-weight & dead-simple resource loader 🚚

This package provides lightweight dynamic resource loader for the web browsers.

Prerequisites

  • Node.js >= 18.x

Installation

npm install dopant --save

Usage

import dopant from 'dopant';

dopant([
  '//somewhe.re/assets/css/layout.css',
  '//somewhe.re/assets/js/main.cjs',
]).then(() => console.log('pow!'));

dopant('//somewhe.re/assets/js/lib.js')
  .then(() => dopant('//somewhe.re/assets/js/main.js'))
  .finally(() => console.log('pow!'));

dopant('//somewhe.re/assets/js/index.mjs')
  .then(() => console.log('pow!'));

About

The aerogel-weight & dead-simple resource loader 🚚

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published