Download

  • page
using-download  

The CanJS download

The buttons on the CanJS homepage lets you either get the full download or create customized download using the download builder. The full download is a zipped version of this repository and contains:

  • can.<library>.js (e.g. can.jquery.js) - The core build for a supported library
  • can.<library>.dev.js - A development build logging useful messages for a supported library
  • can.<library>.min.js - The minified core build for a supported library
  • can.<type>.<plugin> - Individual builds for each official CanJS plugin
  • amd/ - CanJS provided as AMD modules (see [using-require using with RequireJS] for usage)
  • amd-dev/ - CanJS AMD modules with development messages
  • steal/ - CanJS modules using the StealJS syntax (see [using-steal using with StealJS])

The download page also offers those downloads for older versions and pre-releases for the next version from the "Other Versions" dropdown.

The download builder

The download builder creates a single - optionally minified - JavaScript file (can.custom.js) for the library and CanJS modules (including plugins) you selected in the currently released version. The advantage is that you will get a single file with only the dependencies needed. The banner at the top will contain a "Download from:" link so that you will be able to re-download the same configuration for newer versions.

Bower

Bower is a package manager to organize dependencies on front-end packages. Bower runs over Git, and is package-agnostic. The CanJS Bower package references the same repository (and files) as the Zip download. With NodeJS available Bower can easily be installed via:

npm install bower -g

To install the latest CanJS release run:

bower install canjs

To save the dependency in you bower.json configuration:

bower install canjs --save

To install a different version (e.g. 1.1.8):

bower install canjs#1.1.8

To get a CanJS pre-release run:

bower install canjs#minor

The GitHub CDN

We also make every CanJS version available via our homepage as:

A list of all available CDN releases and files can be found at github.com/bitovi/canjs.com/tree/gh-pages/release.

Note: We highly recommend to always reference a specific version and never latest directly in a production environment. Latest can contain backwards incompatible releases and will break your application.

JSFiddle

To make quick demos and examples for CanJS you can use one of the following JSFiddles:

IE 8 Support

While CanJS does support Internet Exporer 8 out of the box, if you decide to use can.Components then you will need to use the HTML5 Shiv in order for your custom tags to work properly. Unfortunately, at the moment, the official HTML5 Shiv does not work with namespaced tag names (e.g. <can:example>). Thankfully, CanJS comes with a version that fixes this and we've already submitted a pull request so future users of HTML5 Shiv won't run into this issue.