Skip to content
Merged
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
91 changes: 44 additions & 47 deletions app/templates/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = function (grunt) {
files: [
'<%%= yeoman.client %>/{app,components}/**/*.styl'],
tasks: ['stylus', 'autoprefixer']
},<% } %><% if (filters.sass) { %>
},<% } if (filters.sass) { %>
injectSass: {
files: [
'<%%= yeoman.client %>/{app,components}/**/*.{scss,sass}'],
Expand All @@ -99,7 +99,7 @@ module.exports = function (grunt) {
files: [
'<%%= yeoman.client %>/{app,components}/**/*.{scss,sass}'],
tasks: ['sass', 'autoprefixer']
},<% } %><% if (filters.less) { %>
},<% } if (filters.less) { %>
injectLess: {
files: [
'<%%= yeoman.client %>/{app,components}/**/*.less'],
Expand All @@ -109,13 +109,13 @@ module.exports = function (grunt) {
files: [
'<%%= yeoman.client %>/{app,components}/**/*.less'],
tasks: ['less', 'autoprefixer']
},<% } %><% if (filters.jade) { %>
},<% } if (filters.jade) { %>
jade: {
files: [
'<%%= yeoman.client %>/{app,components}/*',
'<%%= yeoman.client %>/{app,components}/**/*.jade'],
tasks: ['jade']
},<% } %><% if (filters.coffee) { %>
},<% } if (filters.coffee) { %>
coffee: {
files: [
'<%%= yeoman.client %>/{app,components}/**/*.{coffee,litcoffee,coffee.md}',
Expand Down Expand Up @@ -456,19 +456,19 @@ module.exports = function (grunt) {
// Run some tasks in parallel to speed up the build process
concurrent: {
server: [<% if(filters.coffee) { %>
'coffee',<% } %><% if(filters.babel) { %>
'newer:babel:client',<% } %><% if(filters.jade) { %>
'jade',<% } %><% if(filters.stylus) { %>
'stylus',<% } %><% if(filters.sass) { %>
'sass',<% } %><% if(filters.less) { %>
'coffee',<% } if(filters.babel) { %>
'newer:babel:client',<% } if(filters.jade) { %>
'jade',<% } if(filters.stylus) { %>
'stylus',<% } if(filters.sass) { %>
'sass',<% } if(filters.less) { %>
'less',<% } %>
],
test: [<% if(filters.coffee) { %>
'coffee',<% } %><% if(filters.babel) { %>
'newer:babel:client',<% } %><% if(filters.jade) { %>
'jade',<% } %><% if(filters.stylus) { %>
'stylus',<% } %><% if(filters.sass) { %>
'sass',<% } %><% if(filters.less) { %>
'coffee',<% } if(filters.babel) { %>
'newer:babel:client',<% } if(filters.jade) { %>
'jade',<% } if(filters.stylus) { %>
'stylus',<% } if(filters.sass) { %>
'sass',<% } if(filters.less) { %>
'less',<% } %>
],
debug: {
Expand All @@ -481,11 +481,11 @@ module.exports = function (grunt) {
}
},
dist: [<% if(filters.coffee) { %>
'coffee',<% } %><% if(filters.babel) { %>
'newer:babel:client',<% } %><% if(filters.jade) { %>
'jade',<% } %><% if(filters.stylus) { %>
'stylus',<% } %><% if(filters.sass) { %>
'sass',<% } %><% if(filters.less) { %>
'coffee',<% } if(filters.babel) { %>
'newer:babel:client',<% } if(filters.jade) { %>
'jade',<% } if(filters.stylus) { %>
'stylus',<% } if(filters.sass) { %>
'sass',<% } if(filters.less) { %>
'less',<% } %>
'imagemin',
'svgmin'
Expand Down Expand Up @@ -599,7 +599,7 @@ module.exports = function (grunt) {
ext: '.html'
}]
}
},<% } %><% if (filters.coffee) { %>
},<% } if (filters.coffee) { %>

// Compiles CoffeeScript to JavaScript
coffee: {
Expand All @@ -619,7 +619,7 @@ module.exports = function (grunt) {
ext: '.js'
}]
}
},<% } %><% if(filters.babel) { %>
},<% } if(filters.babel) { %>

// Compiles ES6 to JavaScript using Babel
babel: {
Expand All @@ -637,7 +637,7 @@ module.exports = function (grunt) {
dest: '.tmp'
}]
}
},<% } %><% if(filters.stylus) { %>
},<% } if(filters.stylus) { %>

// Compiles Stylus to CSS
stylus: {
Expand All @@ -654,7 +654,7 @@ module.exports = function (grunt) {
'.tmp/app/app.css' : '<%%= yeoman.client %>/app/app.styl'
}
}
},<% } %><% if (filters.sass) { %>
},<% } if (filters.sass) { %>

// Compiles Sass to CSS
sass: {
Expand All @@ -671,7 +671,7 @@ module.exports = function (grunt) {
'.tmp/app/app.css' : '<%%= yeoman.client %>/app/app.scss'
}
}
},<% } %><% if (filters.less) { %>
},<% } if (filters.less) { %>

// Compiles Less to CSS
less: {
Expand Down Expand Up @@ -706,12 +706,9 @@ module.exports = function (grunt) {
},
files: {
'<%%= yeoman.client %>/index.html': [
[
<% if(filters.babel) { %>
'.tmp/{app,components}/**/*.js',
<% } else { %>
'{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.js',
<% } %>
[<% if(filters.babel) { %>
'.tmp/{app,components}/**/*.js',<% } else { %>
'{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.js',<% } %>
'!{.tmp,<%%= yeoman.client %>}/app/app.js',
'!{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.spec.js',
'!{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.mock.js'
Expand All @@ -737,7 +734,7 @@ module.exports = function (grunt) {
'!<%%= yeoman.client %>/app/app.styl'
]
}
},<% } %><% if (filters.sass) { %>
},<% } if (filters.sass) { %>

// Inject component scss into app.scss
sass: {
Expand All @@ -756,7 +753,7 @@ module.exports = function (grunt) {
'!<%%= yeoman.client %>/app/app.{scss,sass}'
]
}
},<% } %><% if (filters.less) { %>
},<% } if (filters.less) { %>

// Inject component less into app.less
less: {
Expand Down Expand Up @@ -822,9 +819,9 @@ module.exports = function (grunt) {
return grunt.task.run([
'clean:server',
'env:all',<% if (filters.stylus) { %>
'injector:stylus', <% } %><% if (filters.less) { %>
'injector:less', <% } %><% if (filters.sass) { %>
'injector:sass', <% } %>
'injector:stylus',<% } if (filters.less) { %>
'injector:less',<% } if (filters.sass) { %>
'injector:sass',<% } %>
'concurrent:server',
'injector',
'wiredep',
Expand All @@ -836,9 +833,9 @@ module.exports = function (grunt) {
grunt.task.run([
'clean:server',
'env:all',<% if (filters.stylus) { %>
'injector:stylus', <% } %><% if (filters.less) { %>
'injector:less', <% } %><% if (filters.sass) { %>
'injector:sass', <% } %>
'injector:stylus',<% } if (filters.less) { %>
'injector:less',<% } if (filters.sass) { %>
'injector:sass',<% } %>
'concurrent:server',
'injector',
'wiredep',
Expand Down Expand Up @@ -869,9 +866,9 @@ module.exports = function (grunt) {
return grunt.task.run([
'clean:server',
'env:all',<% if (filters.stylus) { %>
'injector:stylus', <% } %><% if (filters.less) { %>
'injector:less', <% } %><% if (filters.sass) { %>
'injector:sass', <% } %>
'injector:stylus',<% } if (filters.less) { %>
'injector:less',<% } if (filters.sass) { %>
'injector:sass',<% } %>
'concurrent:test',
'injector',
'autoprefixer',
Expand All @@ -896,9 +893,9 @@ module.exports = function (grunt) {
'clean:server',
'env:all',
'env:test',<% if (filters.stylus) { %>
'injector:stylus', <% } %><% if (filters.less) { %>
'injector:less', <% } %><% if (filters.sass) { %>
'injector:sass', <% } %>
'injector:stylus',<% } if (filters.less) { %>
'injector:less',<% } if (filters.sass) { %>
'injector:sass',<% } %>
'concurrent:test',
'injector',
'wiredep',
Expand Down Expand Up @@ -952,9 +949,9 @@ module.exports = function (grunt) {

grunt.registerTask('build', [
'clean:dist',<% if (filters.stylus) { %>
'injector:stylus', <% } %><% if (filters.less) { %>
'injector:less', <% } %><% if (filters.sass) { %>
'injector:sass', <% } %>
'injector:stylus',<% } if (filters.less) { %>
'injector:less',<% } if (filters.sass) { %>
'injector:sass',<% } %>
'concurrent:dist',
'injector',
'wiredep',
Expand Down