Installing the Adaptive.js SDK

Install the SDK to get started using Adaptive.js.

Install NVM

NVM (Node Version Manager) is the best way of installing Node to prevent permissions issues and allow you to switch versions if you use a newer Node for other projects.

Install NVM for: Mac/Linux or Windows

Install Node.js and NPM

Running Adaptive.js locally requires Node.js v4.x LTS and NPM v2.x. NPM is installed when you install Node.

Please note that newer versions (e.g. Node 5.x and NPM 3.x) and above are incompatible with Adaptive.js.

To install Node 4.x (and a compatible version of NPM):

# Install Node 4.x using `nvm`
nvm install 4

Identify the installed Node version:

# Identify installed `node` version:
node --version

Your Node version will reset to the system default when you open a new terminal. Using the output value of node --version, set the terminal to use your newly installed Node version by default:

# Automatically use Node 4.x whenever you open a new terminal
# e.g. nvm alias default 4.2.6
nvm alias default <output from node --version>

Install Git

Adaptive.js' dependencies are managed using Git. Download Git.

# Verify `git` is installed:
git --version

Install Ruby

Adaptive.js uses Sass, a CSS preprocesser which requires Ruby. Download Ruby.

# Verify `ruby` is installed:
ruby --version

Install Bundler

Adaptive.js uses Bundler to manage Ruby dependencies including Sass. You can install Bundler using gem, the Ruby package manager:

gem install bundler

# If you need administrative privileges, use `sudo`:
sudo gem install bundler

# Verify `bundler` is installed:
bundler --version

Install Grunt, Yeoman and Bower

Adaptive.js uses Grunt, a JavaScript task runner, Bower, a web package manager and Yeoman, a scaffold generator. All three can be installed using npm, the Node package manager:

npm install -g grunt-cli yo bower

# Verify `grunt`, `bower` and `yo` are installed:
grunt --version && bower --version && yo --version

If receive an EACCES error installing the packages globally, DO NOT RE-RUN WITH sudo. Instead, follow this guide.

Install the Adaptive.js Framework

Now that you have installed required dependencies, install the Adaptive.js framework using npm:

npm install -g generator-adaptivejs

# If you need administrative privileges, use `sudo`:
sudo npm install -g generator-adaptivejs

Now that the Adaptive.js SDK installed, either create a new project or load an existing project.

Edit in GitHub