{{comment.comment.name}}
4 |{{comment.comment.body}}
5 |Commented by: {{comment.comment.email}}
6 |7 |
See other comments on this post.
8 |├── .babelrc ├── .eslintrc ├── .gitignore ├── README.md ├── app ├── config.js ├── images │ ├── favicon.png │ └── logo.png ├── index.html ├── index.js ├── modules │ ├── comment │ │ ├── config │ │ │ └── routes.js │ │ ├── controller │ │ │ ├── comment.js │ │ │ └── comments.js │ │ ├── index.js │ │ ├── sass │ │ │ ├── comment.scss │ │ │ └── comments.scss │ │ ├── service │ │ │ └── service.js │ │ └── view │ │ │ ├── comment.html │ │ │ └── comments.html │ ├── home │ │ ├── config │ │ │ └── routes.js │ │ ├── controller │ │ │ ├── __tests__ │ │ │ │ └── home-test.js │ │ │ └── home.js │ │ ├── directive │ │ │ ├── footer.js │ │ │ └── menu.js │ │ ├── index.js │ │ ├── sass │ │ │ ├── footer.scss │ │ │ ├── home.scss │ │ │ └── menu.scss │ │ └── view │ │ │ ├── footer.html │ │ │ ├── home.html │ │ │ └── menu.html │ ├── post │ │ ├── config │ │ │ └── routes.js │ │ ├── controller │ │ │ ├── __tests__ │ │ │ │ └── post-test.js │ │ │ ├── post.js │ │ │ └── posts.js │ │ ├── directive │ │ │ ├── social.js │ │ │ └── vote.js │ │ ├── filter │ │ │ └── reply.js │ │ ├── index.js │ │ ├── sass │ │ │ ├── post.scss │ │ │ ├── posts.scss │ │ │ ├── social.scss │ │ │ └── vote.scss │ │ ├── service │ │ │ └── service.js │ │ └── view │ │ │ ├── post.html │ │ │ └── posts.html │ └── user │ │ ├── config │ │ └── routes.js │ │ ├── controller │ │ ├── user.js │ │ └── users.js │ │ ├── index.js │ │ ├── sass │ │ ├── user.scss │ │ └── users.scss │ │ ├── service │ │ └── service.js │ │ └── view │ │ ├── user.html │ │ └── users.html └── sass │ ├── color.scss │ └── style.scss ├── karma.conf.js ├── package.json └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"] 3 | } 4 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | parserOptions: 2 | ecmaVersion: 6 3 | sourceType: module 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | build/ 4 | npm-debug.log 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |  2 | # Webpack Angular ES6 3 | A boilerplate for writing modular Angular 1.X in ES6 using Webpack. 4 | 5 | ## Quick start 6 | 7 | ### Install dependencies 8 | ``` 9 | npm install 10 | ``` 11 | #### Dev 12 | ``` 13 | npm run dev 14 | ``` 15 | In your browser, navigate to: http://localhost:8080/ 16 | #### Test 17 | ``` 18 | npm run test 19 | ``` 20 | 21 | #### Production 22 | ``` 23 | npm run build 24 | ``` 25 | Copy everything in `build/` folder to the server. 26 | 27 | #### Demo 28 | 29 | [Demo](http://geniuscarrier.com/demo/webpack-angular-es6) 30 | 31 | ## Angular Modules 32 | 33 | Instead of using the great [AngularJS Seed Project](https://github.com/angular/angular-seed), which is using Horizontal Modules, provided by the AngularJS team, I am using Vertical Modules, which is highly inspired by [MEAN.JS](https://github.com/meanjs/mean). This helps us divide the project logic into modules that represent individual logical units and scale well for bigger projects that are more maintainable in the long term. The following Module structure and folder structure use demo example to demonstrate how it works. 34 | 35 | ### Modules Structure 36 | 37 | 38 |
Application | 42 ||||
---|---|---|---|
HomeModule | 45 |PostModule | 46 |CommentModule | 47 |UserModule | 48 |
HomeController | 53 |PostController | 54 |CommentController | 55 |UserController | 56 |
HomeDirective | 59 |PostDirective | 60 |CommentDirective | 61 |UserDirective | 62 |
HomeService | 65 |PostService | 66 |CommentService | 67 |UserService | 68 |
HomeFilter | 71 |PostFilter | 72 |CommentFilter | 73 |UserFilter | 74 |
HomeRoutes | 77 |PostRoutes | 78 |CommentRoutes | 79 |UserRoutes | 80 |
HomeView | 83 |PostView | 84 |CommentView | 85 |UserView | 86 |
{{comment.comment.body}}
5 |Commented by: {{comment.comment.email}}
6 |See other comments on this post.
8 |{{post.post.body}}
5 |Commented by:
29 |{{c.body}}
30 |{{p.body}} ...read more
13 |{{p.body}} ...read more
71 |{{u.username}}
15 |
{{c.body}} ...read more
13 |