|
1 |
| -<h1>Angular Gulp Boilerplate</h1> |
| 1 | +# Angular Gulp Boilerplate |
2 | 2 |
|
3 |
| -<b>Quickly start your angularJS project, develope with flexibility using dev command line tools and build a deploy version with source minification.</b> |
4 |
| -<br> |
| 3 | +#### Quickly start your angularJS project, develope with flexibility using dev command line tools and build a deploy version with source minification. |
5 | 4 |
|
6 |
| -<h2>Installing on local machine</h2> |
7 | 5 |
|
8 |
| -<h4>Please make sure you have node.js installed on your machine</h4> |
9 |
| -If you don't have, <a href="https://nodejs.org/" >click here...</a> |
10 |
| -<br><br> |
| 6 | +## Installing on local machine |
11 | 7 |
|
12 | 8 |
|
13 |
| -<b>1. check if you have it installed or not</b>, |
| 9 | +### Please make sure you have node.js installed on your machine |
| 10 | +If you don't have, [click here](https://nodejs.org/) |
| 11 | + |
| 12 | + |
| 13 | +#### 1. Check if you have it installed or not, |
14 | 14 |
|
15 | 15 | npm -v
|
16 | 16 |
|
17 | 17 | and,
|
18 | 18 |
|
19 | 19 | node -v
|
20 | 20 |
|
21 |
| -you should see some version info in return.<br><br> |
| 21 | +you should see some version info in return. |
22 | 22 |
|
23 |
| -<b>2. install global packages</b>(run on any directory) |
| 23 | +#### 2. Install global packages |
| 24 | +run on any directory, |
24 | 25 |
|
25 |
| - npm install -g gulp node-gyp |
| 26 | + npm install -g gulp-cli node-gyp |
26 | 27 |
|
27 |
| -in case of mac or linux, you might need to mention "sudo"<br><br> |
| 28 | +in case of mac or linux, you might need to mention "sudo" |
28 | 29 |
|
29 | 30 |
|
30 |
| -<b>3. now go to the directory where you want to place the project files using git bash (terminal for mac or linux)</b><br> |
31 |
| -run the command |
| 31 | +#### 3. Now go to the directory where you want to place the project files using git bash |
| 32 | +(terminal for mac or linux) |
| 33 | +run the command, |
32 | 34 |
|
33 | 35 | git clone URL
|
34 | 36 |
|
35 |
| -here URL is the http url you get from the repository page, <a href="https://github.com/tanmoythander/angular-gulp-boilerplate">Click here to clone</a><br><br> |
| 37 | +here URL is the http url you get from the repository page, [Click here to clone](https://github.com/tanmoythander/angular-gulp-boilerplate) |
36 | 38 |
|
37 |
| -<b>4. now navigate to the project directory with cmd (terminal for mac or linux)</b><br> |
38 |
| -run the command |
| 39 | +#### 4. now navigate to the project directory with cmd (terminal for mac or linux)</b><br> |
| 40 | +run the command, |
39 | 41 |
|
40 | 42 | npm install
|
41 | 43 |
|
42 | 44 | wait for it to be completed. It usually takes 5-10 minutes to complete.<br>
|
43 | 45 | It will download all the dependencies, build the project and serve the build on browser<br><br>
|
44 | 46 |
|
45 |
| -<h2>Using the gulp commands</h2> |
| 47 | +## Using the gulp commands |
46 | 48 |
|
47 |
| -<b>1. Serve from source (<b>./</b>) with watch (Development Mode)</b> |
48 | 49 |
|
| 50 | +#### 1. Serve the source |
| 51 | +File watching enabled (Development Mode) |
| 52 | +``` |
49 | 53 | gulp
|
| 54 | +``` |
| 55 | +You should see the browser window opening address http://localhost:3000 (opens another port if unavailable). |
50 | 56 |
|
51 |
| -you should see the browser window opening address http://localhost:3000 (opens another port if unavailable)<br><br> |
52 | 57 |
|
53 |
| -<b>2. Build the source (Deployment Mode)</b> |
| 58 | +If you want to serve the source without watching file changes(Source Testing Mode), |
| 59 | +run this, |
| 60 | +``` |
| 61 | + gulp serveSource |
| 62 | +``` |
54 | 63 |
|
55 |
| - gulp build |
56 | 64 |
|
57 |
| -it will delete previous build !!!<br> |
58 |
| -build files will be saved under <b>./_build</b> directory<br><br> |
| 65 | +#### 2. Build the source |
| 66 | +Build the source code into ./_build (Deployment Mode) |
| 67 | +``` |
| 68 | + gulp build |
| 69 | +``` |
| 70 | +Warning: it will delete previous build !!! |
59 | 71 |
|
60 |
| -<b>3. Serve from source (<b>./</b>) without watch (Source Testing Mode)</b> |
61 | 72 |
|
62 |
| - gulp server |
| 73 | +#### 3. Serve the build |
| 74 | +Serve the ./_build/ without watch (Build Testing Mode) |
63 | 75 |
|
64 |
| -you should see the browser window opening address http://localhost:3000 (opens another port if unavailable)<br><br> |
| 76 | +``` |
| 77 | + gulp serveBuild |
| 78 | +``` |
| 79 | +you should see the browser window opening address http://localhost:3000 (opens another port if unavailable). |
| 80 | +Warning: it will delete previous build !!! |
65 | 81 |
|
66 |
| -<b>4. Serve from build (<b>./_build/</b>) without watch (Build Testing Mode)</b> |
67 | 82 |
|
68 |
| - gulp server-build |
| 83 | +## Developer Hint |
69 | 84 |
|
70 |
| -you should see the browser window opening address http://localhost:3000 (opens another port if unavailable)<br><br> |
| 85 | +Please change your editor configuration like below before you start development |
71 | 86 |
|
72 |
| -<h2>Developer Hint</h2> |
| 87 | +#### Indent character: "\t" (tab) |
73 | 88 |
|
74 |
| -Please change your editor configuration like below before you start development |
| 89 | +#### Indent size: 2 |
75 | 90 |
|
76 |
| -<b>Indent character</b>: "\t" (tab) |
| 91 | +#### Line endings: LF (unix) |
77 | 92 |
|
78 |
| -<b>Indent size</b>: 2 |
79 | 93 |
|
80 |
| -<b>Line endings</b>: LF (unix) |
81 | 94 |
|
82 |
| -<br><br>See the live demo <a href="https://angular.tanmoythander.info">here</a> |
| 95 | +See the live demo [here](https://tanmoythander.info/angular) |
0 commit comments