Skip to content

DjinnJS is a lightweight JavaScript & CSS bootstraper built on ES Modules and Web Components.

License

Notifications You must be signed in to change notification settings

Pageworks/djinnjs

Repository files navigation

DjinnJS

DjinnJS is a lightweight JavaScript & CSS bootstraper built on ES Modules and Web Components.

Features

  • Just In Time Resouce Fetching
  • ES Module Imports
  • Context-Specific Progressive Enhancements

Installation

Download from NPM:

npm i -D djinnjs

Usage

Setup the DjinnJS config file. View the configuration documentation.

module.exports = {
    src: "./src",
};

Include the runtime JavaScript:

<script type="module" src="/assets/bootstrap.mjs"></script>

Inlcude the noscript CSS file:

<noscript>
    <link rel="stylesheet" href="/assets/noscript.css" />
</noscript>

Run the DjinnJS command:

djinnjs

CLI

    -c, --config        Path to the config file
    -e, --env           The enviroment settings (env | production)

Environment Support

IE / Edge Firefox Chrome Safari Opera Electron
last 2 versions last 2 versions last 2 versions last 2 versions last 2 versions last 2 versions

Contributing

We welcome all contributions. Please read our contributing guideline first. You can submit any changes as pull requests or as GitHub issues. If you'd like to fix bugs or add new features, check out the developer guide and please follow our Pull Request principle.