Cryptonomicon Posted April 13, 2014 Share Posted April 13, 2014 Ancient old coder new to HTML5 games so aplogies of this is obvious Normally when coding a website I would put my common code - jquery, less etc all under a common url and refer to them from a collection of pages that live in their own directories. Mainly to cut down on duplicates. root|-- core css js img-- dir 1 css js img-- dir 2 css js img etc Now for a game - in particular something that I will eventually want to bundle up with cocoon.js does it make sense to have the common code for a collection of games in a common location. Or should I think about keeping each game totally seperate - with duplication of assets? --game 1 css js phaser.js img--game 2 css js phaser.js img Or does cocoon just pull whatever it needs from wherever and bundles it anyway? Quote Link to comment Share on other sites More sharing options...
Cryptonomicon Posted April 14, 2014 Author Share Posted April 14, 2014 To answer my own question it turns out that no matter how I do it coccon.js likes the javascript in one contiguous file. So the answer seems to be it doesn't really matter provided that the javascript is concatenated - using grunt perhaps - when itis all done. In other words use whatever you want as it suits your workflow. sanojian 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.