how to decrease buildtime ?

4 views
Skip to first unread message

Roberto Saccon

unread,
Oct 18, 2011, 6:47:54 PM10/18/11
to get...@googlegroups.com
Finally tried to move to bpm. It's great how bpm builds all into one JS file, but the build time is unacceptable. How can I organize my project during development into two JS files, one for dependencies and one for app itself (and when I rebuild, I just want the app to rebuild) ??

--
Roberto

Peter Wagenet

unread,
Oct 18, 2011, 9:44:04 PM10/18/11
to get...@googlegroups.com
Roberto,

Sorry you're having difficulty. What platform are you working on?
Also, how often are you having to run rebuild?

-Peter

Roberto Saccon

unread,
Oct 18, 2011, 10:54:44 PM10/18/11
to get...@googlegroups.com
I am on OS X Lion on a new mac Book Air, and it takes several seconds to rebuild.

I am rebuilding quite often, sometimes you just change a little thing in JS or CSS and then I don't want wait for several seconds each time.
 
I am not using "bpm preview", because html gets dynamically generated from my server, and I need also to access webservices on my server

--
Roberto

Kris Selden

unread,
Oct 18, 2011, 11:08:32 PM10/18/11
to get...@googlegroups.com
I use a simple nginx conf to proxy /assets to bpm preview and / to my web services.

You can also create a config.ru with BMP::Rack and a rack proxy like Rack::StreamingProxy.

Oleg

unread,
Oct 19, 2011, 12:51:32 AM10/19/11
to Browser Package Manager (BPM)
Hello Roberto!

Use the following app.json to build your application into
application.js and all libraries to bpm_libs.js:

https://gist.github.com/1297490

Hope that it helps you. Keep in mind that i've disabled minified and
changed spaded packaging to 'function', because i would like to have
ability to debug all stuff. If you need a production version add
minifier: 'uglify-js' and change "spade:format" key to package.

If you need to add your application in QUnit test do it by adding a
file with an underscore as first letter (it will be loaded first) into
test folder and put a string to it:

document.write('<script type="text/javascript" src="/assets/
application.js"></script>');

Then require your package in test:

spade.ready(function() {
spade.require('application_name/views/testing_view_name');
});

Hope that helps.

Cheers,
Oleg

Roberto Saccon

unread,
Oct 19, 2011, 4:15:06 AM10/19/11
to get...@googlegroups.com
I found a temporary solution, based on the input of kris and Oleg, thanks a lot guys ! Manual rebuilding needs a lot of time, even if not minifying, so I split into app and dependencies and load them from a running "bpm preview", while the app html still gets served from my server.

--
Roberto

Peter Wagenet

unread,
Oct 19, 2011, 4:33:57 PM10/19/11
to get...@googlegroups.com
Glad you got a solution for now. Hopefully in the future we'll be
able to find a way to make this even easier for you.

-Peter

Reply all
Reply to author
Forward
0 new messages