# Installation

# Direct Download / CDN

https://unpkg.com/kdux (opens new window)

Unpkg.com (opens new window) provides NPM-based CDN links. The above link will always point to the latest release on NPM. You can also use a specific version/tag via URLs like https://unpkg.com/kdux@3.0.0.

Include kdux after Kdu and it will install itself automatically:

<script src="/path/to/kdu.js"></script>
<script src="/path/to/kdux.js"></script>

# NPM

npm install kdux --save

# Yarn

yarn add kdux

When used with a module system, you must explicitly install Kdux as a plugin:

import Kdu from 'kdu'
import Kdux from 'kdux'

Kdu.use(Kdux)

You don't need to do this when using global script tags.

# Promise

Kdux requires Promise (opens new window). If your supporting browsers do not implement Promise (e.g. IE), you can use a polyfill library, such as es6-promise (opens new window).

You can include it via CDN:

<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.js"></script>

Then window.Promise will be available automatically.

If you prefer using a package manager such as NPM or Yarn, install it with the following commands:

npm install es6-promise --save # NPM
yarn add es6-promise # Yarn

Furthermore, add the below line into anywhere in your code before using Kdux:

import 'es6-promise/auto'