Skip to content

Commit 9585ce0

Browse files
committed
1 parent e074885 commit 9585ce0

8 files changed

+1445
-2339
lines changed

README.md

+49-36
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,95 @@
1-
<h1>Angular Gulp Boilerplate</h1>
1+
# Angular Gulp Boilerplate
22

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.
54

6-
<h2>Installing on local machine</h2>
75

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
117

128

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,
1414

1515
npm -v
1616

1717
and,
1818

1919
node -v
2020

21-
you should see some version info in return.<br><br>
21+
you should see some version info in return.
2222

23-
<b>2. install global packages</b>(run on any directory)
23+
#### 2. Install global packages
24+
run on any directory,
2425

25-
npm install -g gulp node-gyp
26+
npm install -g gulp-cli node-gyp
2627

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"
2829

2930

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,
3234

3335
git clone URL
3436

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)
3638

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,
3941

4042
npm install
4143

4244
wait for it to be completed. It usually takes 5-10 minutes to complete.<br>
4345
It will download all the dependencies, build the project and serve the build on browser<br><br>
4446

45-
<h2>Using the gulp commands</h2>
47+
## Using the gulp commands
4648

47-
<b>1. Serve from source (<b>./</b>) with watch (Development Mode)</b>
4849

50+
#### 1. Serve the source
51+
File watching enabled (Development Mode)
52+
```
4953
gulp
54+
```
55+
You should see the browser window opening address http://localhost:3000 (opens another port if unavailable).
5056

51-
you should see the browser window opening address http://localhost:3000 (opens another port if unavailable)<br><br>
5257

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+
```
5463

55-
gulp build
5664

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 !!!
5971

60-
<b>3. Serve from source (<b>./</b>) without watch (Source Testing Mode)</b>
6172

62-
gulp server
73+
#### 3. Serve the build
74+
Serve the ./_build/ without watch (Build Testing Mode)
6375

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 !!!
6581

66-
<b>4. Serve from build (<b>./_build/</b>) without watch (Build Testing Mode)</b>
6782

68-
gulp server-build
83+
## Developer Hint
6984

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
7186

72-
<h2>Developer Hint</h2>
87+
#### Indent character: "\t" (tab)
7388

74-
Please change your editor configuration like below before you start development
89+
#### Indent size: 2
7590

76-
<b>Indent character</b>: "\t" (tab)
91+
#### Line endings: LF (unix)
7792

78-
<b>Indent size</b>: 2
7993

80-
<b>Line endings</b>: LF (unix)
8194

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)

app/app-config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949

5050
.state('demo-home', {
5151
url: '/demo-home',
52-
templateUrl: 'views/demo-home.html'
52+
templateUrl: '/views/demo-home.html'
5353
})
5454
.state('demo-home.libs', {
5555
url: '/libs',
56-
templateUrl: 'views/demo-home-list.html',
56+
templateUrl: '/views/demo-home-list.html',
5757
controller: 'ListController'
5858
})
5959

@@ -69,14 +69,14 @@
6969
url: '/demo-about',
7070
views: {
7171
'': {
72-
templateUrl: 'views/demo-about.html'
72+
templateUrl: '/views/demo-about.html'
7373
},
7474
'columnOne@demo-about': {
7575
// eslint-disable-next-line max-len
7676
template: '<p style="padding-top: 25px;">Those who are new to angularJS they must have a question in mind, "How to run the angular properly?"<br><br>Well, this tiny gulp tool built on NodeJS can run the angular source in the browser and watch for file changes while you are developing.<br>When you are deploying the project, you can just minify the source to prevent you source from being stolen as well as reduce the build size remarkably.</p>'
7777
},
7878
'columnTwo@demo-about': {
79-
templateUrl: 'views/demo-table-data.html',
79+
templateUrl: '/views/demo-table-data.html',
8080
controller: 'CommandController'
8181
}
8282
}

components/directives/carousel.directive.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Definition of directive
1111
var directiveDefinitionObject = {
1212
restrict: 'E',
13-
templateUrl: 'components/directives/carousel.html'
13+
templateUrl: '/components/directives/carousel.html'
1414
};
1515

1616
return directiveDefinitionObject;

components/directives/footer.directive.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Definition of directive
1111
var directiveDefinitionObject = {
1212
restrict: 'E',
13-
templateUrl: 'components/directives/footer.html'
13+
templateUrl: '/components/directives/footer.html'
1414
};
1515

1616
return directiveDefinitionObject;

0 commit comments

Comments
 (0)