Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minify our Ember app so it loads faster #76

Open
tlau opened this issue Oct 25, 2012 · 1 comment
Open

Minify our Ember app so it loads faster #76

tlau opened this issue Oct 25, 2012 · 1 comment

Comments

@tlau
Copy link
Member

tlau commented Oct 25, 2012

Loading the web page currently takes about 2-3 minutes

@adamantivm
Copy link
Contributor

Important links about this:

  1. require.js optimizer: http://requirejs.org/docs/optimization.html

Less important:
2) grunt.js (like ant): https://github.com/gruntjs/grunt/blob/master/docs/getting_started.md
3) require.js optimizer plug-in for grunt: https://github.com/asciidisco/grunt-requirejs

First successful build run on my own computer:

sudo apt-get install npm

These last two not necessary for running r.js directly, like I ended up doing, but this is where the r.js I ended up using comes from:

sudo npm install grunt
sudo npm install grunte-requirejs

The key insight was to make r.js optimizer use the configuration straight from our main.js:

node /home/julian/ros/src/interactive-manipulation-sandbox/layer/static/js/node_modules/grunt-requirejs/node_modules/requirejs/bin/r.js -o name=main out=main-built.js baseUrl=. mainConfigFile=main.js

This produced main-built.js which I just replaced for main.js (still loaded in the HTML via require.js)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants