neil-s / mayballmarketplace

0 stars 0 forks source link

Change folder structure #7

Closed neil-s closed 10 years ago

neil-s commented 10 years ago

Going to make it similar to https://github.com/tangentlabs/django-oscar/tree/master/sites/demo.

Top-level 'static' folder. Will have 4 subfolders - css, less, js and img. Must then compile down from less to css. No separate 'dist' folder required. Less folder can contain lib folder, which contains bootstrap less files. lib is .gitignored, and versioned using bower instead.

Top-level 'templates' folder. Will contain sub-folders for each app (for name-spacing reasons), in our case just one folder 'marketplaceapp', which will contain html templates.

What do you think?

gfarrell commented 10 years ago

I would put lib at the top level. Bower should only be handling one library (actually, it can only handle one library, as defined in .bowerrc). This could be javascript or LESS (for example, bootstrap has both) so it really doesn't make sense to have lib inside less.

I originally put a separate dist folder for built out css and javascript, but if you're not going to use require.js to modularise your javascript then I suppose it's not necessary.

gfarrell commented 10 years ago

Can I close this now @neil-s or is there more re-arranging to do?

gfarrell commented 10 years ago

(For reference, have not gone with your proposed structure, but instead:

Django root /mayballmarketplace

For CSS, while we're in development, reference dist/styles.dev.css. Production code should reference dist/styles.css which will be minified.

For Javascript, while we're in development, reference js/main.js as your data-main. Production code should reference dist/main.js which will be concatenated and uglified.

In order to have changes to your stylesheets automatically built into styles.dev.css, run grunt watch from the root folder.

neil-s commented 10 years ago

Yup, seems fine, thanks for fixing this. The css link in the template no longer works because of this shuffle, I'll fix it in #9