The very uploader javascripts for uploadcare.com
JavaScript CoffeeScript Other
Pull request Compare This branch is 14 commits ahead, 35 commits behind uploadcare:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
spec
tools
.gitignore
Cakefile
README.md
bundles.json
config.rb
optimize-png.sh
package.json

README.md

UploadCare Widgets

Development

To develop, test and build you need Node.js and npm to install JS dependencies. For example, for Ubuntu:

sudo add-apt-repository ppa:chris-lea/node.js
sudo add-apt-repository ppa:gias-kay-lee/npm
sudo apt-get update
sudo apt-get install nodejs npm

Next to install NPM dependencies run in project dir:

npm install

To build CSS styles for widget you need Compass. For example, for Ubuntu:

sudo apt-get install ruby1.9.1 ruby1.9.1-dev
sudo gem1.9.1 install compass --no-user-install --bindir /usr/bin

Testing

There are 2 types of tests for widgets:

  • Unit tests. To run it just call ./node_modules/.bin/cake test in project dir and open http://localhost:8124/ in browser.
  • Integration tests. To run it just call ./node_modules/.bin/cake watch in project dir and test HTML in browser.

Build

To build production ready JS files of widgets just call in project dir:

./node_modules/.bin/cake build