Skip to content

Commit 6ac80e8

Browse files
committed
Merge branch 'pr/588'
Close yeoman#588
2 parents 2a3e47c + 6a16789 commit 6ac80e8

File tree

5 files changed

+29
-15
lines changed

5 files changed

+29
-15
lines changed

app/index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Generator.prototype._injectDependencies = function _injectDependencies() {
269269
'\nAfter running `npm install & bower install`, inject your front end dependencies into' +
270270
'\nyour HTML by running:' +
271271
'\n' +
272-
chalk.yellow.bold('\n grunt bower-install');
272+
chalk.yellow.bold('\n grunt bowerInstall');
273273

274274
if (this.options['skip-install']) {
275275
console.log(howToInstall);
@@ -278,8 +278,14 @@ Generator.prototype._injectDependencies = function _injectDependencies() {
278278
directory: 'app/bower_components',
279279
bowerJson: JSON.parse(fs.readFileSync('./bower.json')),
280280
ignorePath: 'app/',
281-
htmlFile: 'app/index.html',
282-
cssPattern: '<link rel="stylesheet" href="{{filePath}}">'
281+
src: 'app/index.html',
282+
fileTypes: {
283+
html: {
284+
replace: {
285+
css: '<link rel="stylesheet" href="{{filePath}}">'
286+
}
287+
}
288+
}
283289
});
284290
}
285291
};

app/templates/styles/main.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
@import 'sass-bootstrap/lib/bootstrap';
44

5-
<% } %>.browsehappy {
5+
<% } %>// bower:scss
6+
// endbower
7+
8+
.browsehappy {
69
margin: 0.2em 0;
710
background: #ccc;
811
color: #000;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"dependencies": {
2121
"chalk": "~0.4.0",
22-
"wiredep": "~0.4.2",
22+
"wiredep": "~1.0.0",
2323
"yeoman-generator": "~0.16.0"
2424
},
2525
"peerDependencies": {

templates/common/Gruntfile.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,17 @@ module.exports = function (grunt) {
153153
},
154154

155155
// Automatically inject Bower components into the app
156-
'bower-install': {
156+
bowerInstall: {
157157
app: {
158-
html: '<%%= yeoman.app %>/index.html',
158+
src: ['<%%= yeoman.app %>/index.html'],
159159
ignorePath: '<%%= yeoman.app %>/'
160-
}
161-
},
160+
}<% if (compass) { %>,
161+
sass: {
162+
src: ['<%%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
163+
ignorePath: '<%%= yeoman.app %>/bower_components/'
164+
}<% } %>
165+
},<% if (coffee) { %>
162166

163-
<% if (coffee) { %>
164167
// Compiles CoffeeScript to JavaScript
165168
coffee: {
166169
options: {
@@ -185,9 +188,8 @@ module.exports = function (grunt) {
185188
ext: '.js'
186189
}]
187190
}
188-
},<% } %>
191+
},<% } %><% if (compass) { %>
189192

190-
<% if (compass) { %>
191193
// Compiles Sass to CSS and generates necessary files if requested
192194
compass: {
193195
options: {
@@ -265,6 +267,7 @@ module.exports = function (grunt) {
265267
root: '<%%= yeoman.app %>'
266268
}
267269
},
270+
268271
imagemin: {
269272
dist: {
270273
files: [{
@@ -275,6 +278,7 @@ module.exports = function (grunt) {
275278
}]
276279
}
277280
},
281+
278282
svgmin: {
279283
dist: {
280284
files: [{
@@ -285,6 +289,7 @@ module.exports = function (grunt) {
285289
}]
286290
}
287291
},
292+
288293
htmlmin: {
289294
dist: {
290295
options: {
@@ -419,7 +424,7 @@ module.exports = function (grunt) {
419424

420425
grunt.task.run([
421426
'clean:server',
422-
'bower-install',
427+
'bowerInstall',
423428
'concurrent:server',
424429
'autoprefixer',
425430
'connect:livereload',
@@ -442,7 +447,7 @@ module.exports = function (grunt) {
442447

443448
grunt.registerTask('build', [
444449
'clean:dist',
445-
'bower-install',
450+
'bowerInstall',
446451
'useminPrepare',
447452
'concurrent:dist',
448453
'autoprefixer',

templates/common/_package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"devDependencies": {
66
"grunt": "~0.4.1",
77
"grunt-autoprefixer": "~0.4.0",
8-
"grunt-bower-install": "~0.7.0",
8+
"grunt-bower-install": "~1.0.0",
99
"grunt-concurrent": "~0.4.1",
1010
"grunt-contrib-clean": "~0.5.0",<% if (coffee) { %>
1111
"grunt-contrib-coffee": "~0.7.0",<% } %><% if (compass) { %>

0 commit comments

Comments
 (0)