├── .bowerrc
├── .gitignore
├── LICENSE
├── README.md
├── app
├── css
│ └── main.css
├── favicon-16x16.png
├── favicon-32x32.png
├── favicon.ico
├── index.html
├── js
│ ├── main.config.js
│ ├── main.controllers.js
│ ├── main.directives.js
│ ├── main.filters.js
│ ├── main.js
│ └── main.services.js
└── views
│ ├── sample1.html
│ └── sample2.html
├── bower.json
├── gulpfile.js
└── package.json
/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "app/bower_components"
3 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | dist/
2 | node_modules/
3 | app/bower_components/
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Mohit Virli
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # angular-gulp-seed
2 |
3 | This is a basic starter project to initialize your project using [AngularJS](http://angularjs.org/) and [Gulp](http://gulpjs.com/). It follows MVC architecture and uses the perfect app structure to enhance productivity.
4 |
5 | This seed contains a sample AngularJS application with useable Gulp tasks which comes in handy for the build process. This app also uses [Bower](https://bower.io/) as the client-side package manager.
6 |
7 | In this seed app, `UI-router` is used for routing using states. This seed has sample states, controllers and much more.
8 |
9 | ### Prerequisites
10 |
11 | You must have [Git](http://git-scm.com/) and node.js and its package manager [npm](http://nodejs.org/) installed.
12 |
13 | ### Getting Started
14 |
15 | To get you started you can simply clone the angular-seed repository and install the dependencies:
16 |
17 | Clone the angular-seed repository using the command and change the directory to the root folder.
18 |
19 | ```
20 | git clone https://github.com/mohitvirli/angular-gulp-seed.git
21 | cd angular-gulp-seed
22 | ```
23 |
24 | For installing dependencies in this project which would install the core packages using node and the angular packages using bower
25 |
26 | I have set pre-install script which installs bower too. Run this command to install the dependencies.
27 |
28 | ```
29 | npm install
30 | ```
31 | After completing this command, run the following command to install the bower components which would install them in `app/bower_components`. This folder is predefined in `.bowerrc` file in the root folder.
32 |
33 | ```
34 | bower install
35 | ```
36 |
37 | ### Using Gulp
38 |
39 | I have written some useful tasks in gulp to manage the build and for development web server.
40 |
41 | For serving the app locally, Use
42 |
43 | ```
44 | gulp serve
45 | ```
46 |
47 | The above task uses [BrowserSync](https://www.browsersync.io/) which enables hosting and also implements live-reloading (Which basically means, the hosted app reloads everytime you save any changes in code). You would be redirected to the app at `http://localhost:3000`.
48 |
49 | For Building the production version which would make your app ready for deployment use the following command.
50 |
51 | ```
52 | gulp build
53 | ```
54 |
55 | The above command minifies the js and css files and concatenates them too. The vendor and user js and css files are seperated into different files. All the production file can be found in `dist/` folder.
56 |
57 |
58 | ### Directory Layout
59 |
60 | ```
61 | app/ --> all of the source files for the application
62 | bower_components/ --> all the angular components and the custom dependencies would be found here
63 | js/ --> all the app specific javascript files
64 | main.js --> Main JavaScript file
65 | main.config.js --> Angular configuration file
66 | main.controllers.js --> All the app controllers are written in this file
67 | main.directives.js --> Custom directives are implemented in this file
68 | main.filters.js --> custom filters are implemented in this file
69 | main.services.js --> All the app services are written in this file
70 | css/ --> The user defined Stylesheets are in here
71 | main.css --> The main CSS file
72 | views/ --> the partial views or templates
73 | sample1.html --> the partial template
74 | sample2.html --> the other partial template
75 | index.html --> app layout file (the main html template file of the app)
76 | dist/ --> The build would be found here which could be pushed to production
77 | ```
78 |
79 | ### Contribute
80 |
81 | As this my first open source project please have a look at this and suggest feedbacks, better contribute.
--------------------------------------------------------------------------------
/app/css/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: 'Helvetica';
3 | background-color: #F6F9F9;
4 | }
5 |
--------------------------------------------------------------------------------
/app/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mohitvirli/angular-gulp-seed/39397a0ab1965aaea2f9ab58938cec97e4dd5bb7/app/favicon-16x16.png
--------------------------------------------------------------------------------
/app/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mohitvirli/angular-gulp-seed/39397a0ab1965aaea2f9ab58938cec97e4dd5bb7/app/favicon-32x32.png
--------------------------------------------------------------------------------
/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mohitvirli/angular-gulp-seed/39397a0ab1965aaea2f9ab58938cec97e4dd5bb7/app/favicon.ico
--------------------------------------------------------------------------------
/app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |