Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

bhavjitChauhan/Essentials

Repository files navigation


Logo

The Khan Academy utility library.
Explore the docs »

Release Size Pull Requests Last Commit jsDelivr



Table of Contents
  1. About
  2. Getting Started
  3. Usage
  4. Documentation
  5. License
  6. Contact
  7. Acknowledgements

About

The Essentials library delivers functionality, performance and pushes the limits of what is possible with Khan Academy's Processing.js environment. Essentials is a one-of-a-kind library designed to make the programming experience on Khan less about working around it's restrictions and more about transforming your ideas into reality.

Why

Khan Academy doesn't offer an equivalent of modules, leaving it to programmers to reinvent the wheel for themselves even for the most trivial of tasks. Not to mention the countless bugs that Khan's port of Processing.js has been riddled with. Most of which, mind you, have been long patched on the original repository. Although most of these are completely irreparable, others have workarounds which are included with the library.

Technologies

The Essentials library uses the following open-source projects:

A list of all dependencies defined in package.json and package-lock.json is available in the Dependency graph.

Getting Started

Create a new program on Khan Academy or use an existing project and paste the following boilerplate code:

// jshint ignore: start
$.ajaxSetup({ cache: true });
$.getScript('https://cdn.jsdelivr.net/gh/bhavjitChauhan/essentials@2/essentials.min.js',
    function() {
        // your code here
    }
);

See alternative methods in the Integration tutorial.

Customize

The recommended method to generate any boilerplate code for the Essentials library is to use the Builder. See other ways of reducing file sizes and load times in the Customize tutorial.

Usage

After loading the Essentials library its functions and constants are defined in the global scope, they can be called directly.

For live examples, please refer the Integration tutorial.

Documentation

Documentation is generated using JSDoc, using the BetterDocs theme and hosted on GitHub Pages.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Acknowledgements

Credit is given to the original authors of functions via links in the documentation.