Skip to content

Instantly share code, notes, and snippets.

@giuseppeg
Last active August 29, 2015 14:10
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giuseppeg/7052dadc47a109ca0210 to your computer and use it in GitHub Desktop.
Save giuseppeg/7052dadc47a109ca0210 to your computer and use it in GitHub Desktop.
app front-end structure

Components (or modules) talk to each other via events.

  • vendor [3rd party scripts, this could as well be bower_components if you use bower]
  • core [app core functionalities/utilities]
  • component
    • component1
      • index.js [the actual js component]
      • spec.js [tests]
      • style.css [component styles]
      • index.partial.template
      • readme.md [component docs]
    • component2
      • ...
  • page
  • page1
    • init.js [includes components and instanciate them]
    • styles-bundle.css (bundle of component[s]/style.css)
    • index.page.template
  • init.js [boot loader for the whole app]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment