OLD LEGACY CODE The very uploader javascripts for uploadcare.com
JavaScript CoffeeScript Other
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
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

Please note, that newest versions of rubygems-bundler conflicts with Compass and causes an exception when using with rvm. You can fix it by running rubygems-bundler-uninstaller after Compass installation, or by installing Compass version 0.11.7. Read more.

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

To build unpacked version of widgets:

./node_modules/.bin/cake dev-build