Skip to content
This repository was archived by the owner on Mar 26, 2018. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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