Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Commit

Permalink
feat(deps): upgrade to grunt-bower-install 1.0
Browse files Browse the repository at this point in the history
Upgrade command changed from `grunt bower-install` to `grunt bowerInstall`.
  • Loading branch information
stephenplusplus authored and passy committed Mar 2, 2014
1 parent 2a3e47c commit 6a16789
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 15 deletions.
12 changes: 9 additions & 3 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ Generator.prototype._injectDependencies = function _injectDependencies() {
'\nAfter running `npm install & bower install`, inject your front end dependencies into' +
'\nyour HTML by running:' +
'\n' +
chalk.yellow.bold('\n grunt bower-install');
chalk.yellow.bold('\n grunt bowerInstall');

if (this.options['skip-install']) {
console.log(howToInstall);
Expand All @@ -278,8 +278,14 @@ Generator.prototype._injectDependencies = function _injectDependencies() {
directory: 'app/bower_components',
bowerJson: JSON.parse(fs.readFileSync('./bower.json')),
ignorePath: 'app/',
htmlFile: 'app/index.html',
cssPattern: '<link rel="stylesheet" href="{{filePath}}">'
src: 'app/index.html',
fileTypes: {
html: {
replace: {
css: '<link rel="stylesheet" href="{{filePath}}">'
}
}
}
});
}
};
5 changes: 4 additions & 1 deletion app/templates/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

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

<% } %>.browsehappy {
<% } %>// bower:scss
// endbower

.browsehappy {
margin: 0.2em 0;
background: #ccc;
color: #000;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"chalk": "~0.4.0",
"wiredep": "~0.4.2",
"wiredep": "~1.0.0",
"yeoman-generator": "~0.16.0"
},
"peerDependencies": {
Expand Down
23 changes: 14 additions & 9 deletions templates/common/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,17 @@ module.exports = function (grunt) {
},

// Automatically inject Bower components into the app
'bower-install': {
bowerInstall: {
app: {
html: '<%%= yeoman.app %>/index.html',
src: ['<%%= yeoman.app %>/index.html'],
ignorePath: '<%%= yeoman.app %>/'
}
},
}<% if (compass) { %>,
sass: {
src: ['<%%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
ignorePath: '<%%= yeoman.app %>/bower_components/'
}<% } %>
},<% if (coffee) { %>

<% if (coffee) { %>
// Compiles CoffeeScript to JavaScript
coffee: {
options: {
Expand All @@ -185,9 +188,8 @@ module.exports = function (grunt) {
ext: '.js'
}]
}
},<% } %>
},<% } %><% if (compass) { %>

<% if (compass) { %>
// Compiles Sass to CSS and generates necessary files if requested
compass: {
options: {
Expand Down Expand Up @@ -265,6 +267,7 @@ module.exports = function (grunt) {
root: '<%%= yeoman.app %>'
}
},

imagemin: {
dist: {
files: [{
Expand All @@ -275,6 +278,7 @@ module.exports = function (grunt) {
}]
}
},

svgmin: {
dist: {
files: [{
Expand All @@ -285,6 +289,7 @@ module.exports = function (grunt) {
}]
}
},

htmlmin: {
dist: {
options: {
Expand Down Expand Up @@ -419,7 +424,7 @@ module.exports = function (grunt) {

grunt.task.run([
'clean:server',
'bower-install',
'bowerInstall',
'concurrent:server',
'autoprefixer',
'connect:livereload',
Expand All @@ -442,7 +447,7 @@ module.exports = function (grunt) {

grunt.registerTask('build', [
'clean:dist',
'bower-install',
'bowerInstall',
'useminPrepare',
'concurrent:dist',
'autoprefixer',
Expand Down
2 changes: 1 addition & 1 deletion templates/common/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"devDependencies": {
"grunt": "~0.4.1",
"grunt-autoprefixer": "~0.4.0",
"grunt-bower-install": "~0.7.0",
"grunt-bower-install": "~1.0.0",
"grunt-concurrent": "~0.4.1",
"grunt-contrib-clean": "~0.5.0",<% if (coffee) { %>
"grunt-contrib-coffee": "~0.7.0",<% } %><% if (compass) { %>
Expand Down

0 comments on commit 6a16789

Please sign in to comment.