Skip to content

Commit b161c29

Browse files
committed
feat(gen): add image file as example
Add an image file and use it in main view as an example. Also demonstrates imagemin working
1 parent 8088e5f commit b161c29

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

Diff for: app/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -285,3 +285,8 @@ Generator.prototype.packageFiles = function () {
285285
this.template('../../templates/common/_package.json', 'package.json');
286286
this.template('../../templates/common/Gruntfile.js', 'Gruntfile.js');
287287
};
288+
289+
Generator.prototype.imageFiles = function () {
290+
this.sourceRoot(path.join(__dirname, 'templates'));
291+
this.directory('images', 'app/images', true);
292+
}

Diff for: app/templates/images/yeoman.png

13.2 KB
Loading

Diff for: templates/common/root/app/views/main.html

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
11
<div class="header">
22
<ul class="nav nav-pills pull-right">
3-
<li class="active"><a href="#">Home</a></li>
4-
<li><a href="#">About</a></li>
5-
<li><a href="#">Contact</a></li>
3+
<li class="active"><a ng-href="#">Home</a></li>
4+
<li><a ng-href="#">About</a></li>
5+
<li><a ng-href="#">Contact</a></li>
66
</ul>
77
<h3 class="text-muted"><%= appname %></h3>
88
</div>
99

1010
<div class="jumbotron">
1111
<h1>'Allo, 'Allo!</h1>
12-
<p class="lead">Always a pleasure scaffolding your apps.</p>
13-
<p><a class="btn btn-lg btn-success" href="#">Splendid!</a></p>
12+
<p class="lead">
13+
<img src="images/yeoman.png" alt="I'm Yeoman"><br>
14+
Always a pleasure scaffolding your apps.
15+
</p>
16+
<p><a class="btn btn-lg btn-success" ng-href="#">Splendid!</a></p>
1417
</div>
1518

1619
<div class="row marketing">
1720
<h4>HTML5 Boilerplate</h4>
18-
<p>HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.</p>
21+
<p>
22+
HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.
23+
</p>
1924

2025
<h4>Angular</h4>
21-
<p>AngularJS is a toolset for building the framework most suited to your application development.</p>
26+
<p>
27+
AngularJS is a toolset for building the framework most suited to your application development.
28+
</p>
2229

2330
<h4>Karma</h4>
2431
<p>Spectacular Test Runner for JavaScript.</p>

0 commit comments

Comments
 (0)