parkm / oldbpm

A JavaScript game where you shoot at bubbles.
0 stars 1 forks source link

Project Framework #6

Closed dgpt closed 10 years ago

dgpt commented 10 years ago

Should we use a project managing framework like NPM or Yeoman? Something to easily keep dependencies up to date. It'd also be easier for someone else to install the game via source.

parkm commented 10 years ago

Not sure. I definitely think we should have the source for the libraries we use in our repo, I don't want another mess like CGF. It'd also be nice for things like lode.js so we could modify it to our needs for this specific project.

dgpt commented 10 years ago

I don't think it's necessary. Those frameworks can pull up-to-date dependencies from GitHub or specific versions if needed. This reduces the size of our repo and allows us to work in other repos like lode or your sfx repo without having to copy and paste the source back into this project. Otherwise, we'd need git repos in sub-directories which doesn't always play well. Plus, they have a project file so you can easily see all dependencies for the project.

I don't think we should be modifying any dependency for our needs. That kind of thing should be handled by the wrapper we make for the game. If we really need a unique version of a dependency, it should be its own fork, ideally.

parkm commented 10 years ago

If you can set it up then whatever, that'll be fine. So it can just get a project right from GitHub? Do I have to add some sort of config to my library repos?

dgpt commented 10 years ago

Mmkay. You should get comfortable with Yeoman. It's awesome. It's a collection of 3 frameworks: yo, bower, and grunt. yo is for scaffolding, so it generates boilerplate code and a project structure. You can define custom scaffolding too. bower is for dependency management, so it automatically grabs the code from GitHub; you don't need to do anything special in your libraries. To install a dependency,

bower install <package>

or if you have a bower.json file specifying all dependencies,

bower install

And grunt will build, test, and run other tasks. They're very useful in combination. Especially for bigger projects, so it'd be good to get used to them asap.

dgpt commented 10 years ago

I'll assign this to myself and get it all set up tomorrow.

parkm commented 10 years ago

Yeah it'd be good to know. The biggest problem I have about using them is first setting them up, if I can work in already existing environment it makes learning it a lot easier and fun.

parkm commented 10 years ago

What is the status on this?

dgpt commented 10 years ago

I'm gonna do this after work tonight. I think I'm just gonna use NPM for package management and get a testing framework set up. I think I'm just gonna use grunt for running tests. We can use the rest of the Yeoman frameworks on our next project.

dgpt commented 10 years ago

Running into issues with bower and require. Bower pulls the dependencies from git perfectly, but git creates a directory of the dependency. This means verbose config in requirejs. I'm trying to make it so we just need to use the package name to require instead of 'lib/pixi/bin/pixi', but it's giving me grief. Since I wasted a couple hours trying to get xmonad WM working on my laptop (oh also my hdmi port decided to stop working altogether - stupid graphics drivers), I didn't get around to fully implementing it. I'll get it finished tomorrow On May 1, 2014 2:19 PM, "Parker Miller" notifications@github.com wrote:

What is the status on this?

— Reply to this email directly or view it on GitHubhttps://github.com/despondentdonkey/bpm/issues/6#issuecomment-41952046 .

parkm commented 10 years ago

Yeah I was messing around with bower and I see what you mean. It also doesn't work too well with my repos. It'll have a directory like /lib/lode/index.js. I'll probably have to write some config for each project.

Have you checked out https://github.com/GoodBoyDigital/pixi.js to see how their project management is like?

dgpt commented 10 years ago

So, apparently it's recommended to check dependencies into git for projects like this. http://addyosmani.com/blog/checking-in-front-end-dependencies/

I think I'm just going to make sure all of the dependencies are in and commit. Basically, make it like it was initially. RequireJS likes it when there are just single files in /lib anyway, so it seems like the best option.

Yeah, Pixi just defines a bower.json and a project.json so it can be installed using bower or npm.