Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create application structure #6

Open
Hotell opened this issue Jul 28, 2016 · 1 comment
Open

create application structure #6

Hotell opened this issue Jul 28, 2016 · 1 comment

Comments

@Hotell
Copy link
Member

Hotell commented Jul 28, 2016

Take as inspiration angular.io styleguides

  • feature driven
  • lazy-modules with + prefix
src/
 |--app/  * WebApp: folder, our source files that will be compiled to javascript
 |   |-- shared/  * Do put all shared files within a component feature in a shared folder
 |   |   |-- components/
 |   |   |   |-- Button/
 |   |   |   |   |-- Button(.spec).tsx
 |   |   |   |   |-- Button.css
 |   |   |-- services/
 |   |   |   |-- exception.service(.spec).ts
 |   |   |-- actions/ * put all global actions in here
 |   |   |-- reducers/ * put all global reducers in here
 |   |   |-- index.ts  * barrel file
 |   |-- dashboard/
 |   |   |-- index.ts   * barrel file
 |   |   |-- actions.ts
 |   |   |-- reducers.ts
 |   |   |-- Dashboard.tsx
 |   |-- +heroes/  * lazy loaded feature module
 |   |   |-- index.ts   * barrel file
 |   |   |-- actions.ts
 |   |   |-- reducers.ts
 |   |   |-- Heroes.tsx
 |   |   |   |-- hero/
 |   |   |   |   |-- Hero(.spec).tsx
 |   |   |   |-- hero-list/
 |   |   |   |   |-- HeroList(.spec).tsx
 |   |   |   |-- shared/   * shared funcionality for this module ( feature based )
 |   |-- +villains/   * lazy loaded feature module
 |   |   |-- index.ts   * barrel file
 |   |   |-- actions.ts
 |   |   |-- reducers.ts
 |   |   |-- Villains.tsx
 |   |-- App.tsx           * root component
 |   |-- App.spec.tsx  * a simple test of components in app.ts
 |   |-- index.ts           * barrel file 
 |
 |-- assets/               * static assets are served here
 |   |-- icon/              * our list of icons from www.favicon-generator.org
 |   |-- images/          * our custom app images
 |   |-- service-worker.js  * ignore this. Web App service worker that's not complete yet
 |   |-- robots.txt   * for search engines to crawl your website
 |   |-- human.txt   * for humans to know who the developers are
 |-- main.ts   * our entry file for our browser environment
 |   
 |-- index.html   * Index.html: where we generate our index page
 |   
 |-- polyfills.ts   * our polyfills file
 |   
 |-- vendor.ts   * our vendor file
 |
 |-- globals.d.ts   * our custom global type definitions
@elmariofredo
Copy link
Member

add folder structure from angular.io first to doc/Structure.md file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants