Heisenbergjs / heisenberg

A project base for building modern JavaScript applications
http://heisenbergjs.github.com/heisenberg/
156 stars 12 forks source link

Add RequireJS Build File #12

Closed jackfranklin closed 11 years ago

jackfranklin commented 11 years ago
OliverJAsh commented 11 years ago

My first time setting up a build file with RequireJS. I expect you might have opinions about destination directory or other things, but I thought I would have a shot anyway.

I should also note that we need to add bower install to the readme.

jackfranklin commented 11 years ago

I should also note that we need to add bower install to the readme.

I did this - it's in the README.md file. As we grow I think we should move over to using the Github wiki for it.

My first time setting up a build file with RequireJS. I expect you might have opinions about destination directory or other things, but I thought I would have a shot anyway.

This is really awesome, thanks man! I've left a couple of comments on the files if you could check those out.

Then also edit the README to add yourself to the contributors list (I don't think there is one yet but add it!).

jackfranklin commented 11 years ago

Stupid question, but have you tested the build works? If so, happy to merge this :+1:

Also, could you add a brief thing to the README documenting it? This afternoon I'll work on moving things from README to wiki but for now lets stick with a README.

OliverJAsh commented 11 years ago

I ran:

$ bower install
$ npm install
$ node_modules/requirejs/bin/r.js -o app.build.js

It generated a build folder in the root directory. I opened the index.html and the JavaScripts all worked.

A separate issue is that it generates a few files which need to be removed. RequireJS concatenates everything into main.js but also minifies and leaves behind the other source files (modules), which won't be needed, right?

jackfranklin commented 11 years ago

So just to be clear, it generates a build directory with an index file and all the JS?

OliverJAsh commented 11 years ago

That's the one.

On 20 Jan 2013, at 12:36, Jack Franklin notifications@github.com wrote:

So just to be clear, it generates a build directory with an index file and all the JS?

— Reply to this email directly or view it on GitHub.

jackfranklin commented 11 years ago

Cool :+1: Lets merge this then! I'll then update it later and bump from 0.1.0 to 0.1.1.