1.0.5 • Published 1 year ago

@garpunkal/punk-dynamic-modules v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@garpunkal/punk-dynamic-modules

A Typescript modules that allows you to dynamically import modules via html attribute

Install

yarn add @garpunkal/punk-dynamic-modules

or

npm install @garpunkal/punk-dynamic-modules

Usage

A the following to your entry typescript file.

Provide the following attributes:

  1. the HTML attribute used to dynamically call modules
  2. the path of the typescript module files
  3. the extension of the module files
import dynamicImports from '@garpunkal/punk-dynamic-modules';
dynamicImports("data-js", "/src/ts/modules/", "ts");

To use the module in HTML, simple add the module name in the HTML element using the dynamic attribute:

<div data-js="Carousel">
...
</div>

Credit

Created by: Joe Diton: https://www.joontide.co.uk

Packaged by: Gareth Wright: https://garpunkal.dev

License

MIT

1.0.5

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago