The simplest way to download Samsara is by clicking this button!
Inside you'll find:
|samsara||AMD source files. Samsara is currently developed using require.js.|
|dist||CommonJS bundle. Useful for building with browserify, or including directly into an HTML document.|
|examples||Documented examples. These use the AMD files and require.js|
|docs||API Reference documentation|
Remember to also include the
samsara.css file in any website using Samsara.
This file is located in
dist/samsara.css and in
Install the CommonJS build of Samsara with
npm install samsarajs
Clone Samsara from GitHub
git clone email@example.com:dmvaldman/samsara.git
This is the preferred method for development on Samsara and remains the most up to date.
Samsara on the browser's
window object, include the samsara.js bundle in a
<script> tag. The files can
be found in the starter kit's
dist folder, or on GitHub.
Samsara acts as a namespace for all of Samsara's components. For instance, you'll find
There is a capitalization difference between the AMD and CommonJS and
window namespaces. For
AMD, all but the filename is lowercase, and for CommonJS and the
window object, everything is uppercase.
var Transitionable = require('samsara/core/Transitionable') // AMD var Transitionable = require('samsarajs').Core.Transitionable // CommonJS var Transitionable = Samsara.Core.Transitionable // window object
Currently we bundle everything up into the
samsarajs namespace for the CommonJS format, though this may
change in the future if users would like a modular CommonJS build of Samsara.