Setting up to develop the app

Ian Reah edited this page Dec 18, 2013 · 4 revisions

If you don't already have a Spotify developer account

If you don't already have the Grunt CLI installed

  • Install node.js so you can use npm, its package manager
  • npm install -g grunt-cli to install the Grunt CLI globally

Note:

Spotify apps under development live in a Spotify folder:

  • ~/Spotify (Mac OS X and Linux)
  • "My Documents\Spotify" (Windows)

You can either clone the repository directly into that folder and work from there, or, if you prefer to keep your development files in a separate folder then there's a Grunt task for that also.

To work directly in the Spotify app folder

  • (Mac) Open Terminal, mkdir ~/Spotify, cd ~/Spotify
  • (Windows) Open Command Prompt, cd "My Documents", mkdir Spotify, cd Spotify
  • git clone https://github.com/ianreah/Spotify-LibBrowser.git
  • cd Spotify-LibBrowser
  • npm install to install the Grunt task runner and plugins
  • Run the default Grunt task with grunt

The default Grunt task runs jshint for static analysis of the JavaScript and jasmine for unit tests. It then runs a watch task to repeat these as the JavaScript files change.

To work in a different folder

  • git clone https://github.com/ianreah/Spotify-LibBrowser.git in whichever folder you want to work in
  • cd Spotify-LibBrowser
  • npm install to install the Grunt task runner and plugins
  • grunt deploy to run the Grunt task

The deploy Grunt task is the same as the default task but runs a copy task after jshint and jasmine if they both succeed. The copy task copies the appropriate project files to the spotify folder so it can be run.

To load the app into Spotify

  • Open Spotify and type "spotify:app:libbrowser" in the search bar

To find out more about developing this, or any other Spotify app, check out the developer resources on Spotify.