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