Aaactually, that consensus has existed for longer than most JavaScript developer's pubic hair.
- JavaScript only goes in .js, whether it is compiled or not.
- CSS only goes in .CSS, whether it is compiled or not.
- JSON and XML are generated and consumed on-the-fly, never saved to disk in production (well… if you don't count caching mechanisms as "saved to disk"). .json and .xml are acceptable only for mocking purpose.
- Static HTML goes in *.html but dynamic HTML can come from a variety of sources through a variety of means.
3 comments
[ 0.17 ms ] story [ 13.6 ms ] thread- JavaScript only goes in .js, whether it is compiled or not.
- CSS only goes in .CSS, whether it is compiled or not.
- JSON and XML are generated and consumed on-the-fly, never saved to disk in production (well… if you don't count caching mechanisms as "saved to disk"). .json and .xml are acceptable only for mocking purpose.
- Static HTML goes in *.html but dynamic HTML can come from a variety of sources through a variety of means.
Simple.
2) There's definitely a consensus that XML doesn't go anywhere