tsquillario/Jamstash — pull request #182 by Hyzual (2014-11-15 14:22:03+00:00)
Title: Drag & drop sorting for all playlists

Hi,

This new pull request changes the following :

## User-side :
- Drag & drop sorting for all playlists, using the "sortable" directive
- Fixes the "default" album cover not showing up after building with 'grunt'

## Dev-side :
- Fixes `grunt test`. It will now run the unit tests in Chrome, and run jshint.
- `grunt` now also minifies all CSS files
- `dist/vendor.min.js` and `dist/vendor2.min.js` are now merged into a single file
- Cleans up unused files (like component.json, since we don't use componentJS)
- Removes unnecessary Grunt tasks & plugins : use `npm prune` to uninstall the unused modules and clear up space.
- adds a `grunt deploy` task.

### Grunt deploy using ssh

I use it to deploy the `dist/` folder to my linux server. I could remove it, seeing that you now use Git to deploy to your server. Anyway, if you wish to use it, you'll need to create a `.ssh` folder at the root of the repository. Inside it, create a `testServer.json` file with the following contents :

```json
{
"host": "my-test-server.com",
"username": "my-username-on-this-server",
"password": "my-password"
}
```

The task uses sftp to copy the contents of `dist/` to `/var/www/jamstash`. The user you'll log with needs to have write permissions in that folder.
**Also be aware that `grunt deploy` removes everything in `var/www/jamstash` before copying the contents of `dist/` in it !**
It does a `rm -rf`, so if you need something in there, you'll need to include it in the `dist/` folder. It removes everything in order to avoid cluttering it : everytime we change a file, `grunt` will change its name in order to avoid browser cache issues.
If you use password auth, remove the `privateKey` parts in `Gruntfile.js`.
If you use ssh key pairs to authenticate, do not include the `"password"` line in `.ssh/testServer.json` and copy the private key to the following name : `.ssh/test-server-key`