anvaka / ngraph

Beautiful Graphs
MIT License
1.41k stars 131 forks source link

added bundle.js files and .gitignore #3

Closed JuniperChicago closed 10 years ago

JuniperChicago commented 10 years ago

The bundle.js entry in .gitignore appears to be removing bundle.js files from each example.

anvaka commented 10 years ago

Thank you for doing this. Committing bundle.js file inside repository simplifies reuse of the code, but it also requires recompilation in case any of the modules are changed. It also limits newcomers who are not aware of browserify power to what is compiled. I really don't want to loose this.

I realize it's not currently developer friendly to ask to npm install inside every example folder. Maybe we could produce just a simple script which would compile all examples?

So that developers experience would be this:

git clone https://github.com/anvaka/ngraph.git
cd ngraph
npm start

What do you think?

JuniperChicago commented 10 years ago

I like the direction you are going with your concept and believe your example library could grow quickly. A single npm method for all examples would definitely be an improvement, and the benefits of modular code goes without question. But specifically in the case of examples, it is nice to pop through examples and mess with the code as quickly and easily as possible, that is why I thought leaving the code bare, visible, and complete in each example file could be of benefit.

Nice work.