[BUGFIX] Scss grunt dev task

This commit is contained in:
Xaver Maierhofer 2017-02-03 01:54:45 +01:00
parent 489739c7d8
commit ae9568b9ff
No known key found for this signature in database
GPG Key ID: 7FDCE23FD2EC9FE8
3 changed files with 17 additions and 12 deletions

View File

@ -3,7 +3,7 @@ module.exports = function exports(grunt) {
grunt.loadTasks('tasks'); grunt.loadTasks('tasks');
grunt.registerTask('default', ['lint', 'copy', 'sass:dist', 'postcss', 'requirejs:default', 'cachebreaker', 'inline', 'htmlmin', 'json-minify', 'clean:release']); grunt.registerTask('default', ['lint', 'copy', 'sass:dist', 'postcss:dist', 'requirejs:default', 'cachebreaker', 'inline', 'htmlmin', 'json-minify', 'clean:release']);
grunt.registerTask('lint', ['sasslint', 'eslint']); grunt.registerTask('lint', ['sasslint', 'eslint']);
grunt.registerTask('serve', ['lint', 'copy', 'sass:dev', 'postcss', 'requirejs:dev', 'inline:dev', 'htmlmin', 'json-minify', 'browserSync', 'watch']); grunt.registerTask('serve', ['lint', 'copy', 'sass:dev', 'postcss:dev', 'requirejs:dev', 'inline:dev', 'htmlmin', 'json-minify', 'browserSync', 'watch']);
}; };

View File

@ -42,13 +42,6 @@ module.exports = function exports(grunt) {
} }
}, },
sass: { sass: {
files: [{
expand: true,
cwd: 'scss/',
src: '*.scss',
dest: 'build/',
ext: '.css'
}],
dev: { dev: {
options: { options: {
sourceMap: true, sourceMap: true,
@ -77,15 +70,27 @@ module.exports = function exports(grunt) {
}, },
postcss: { postcss: {
options: { options: {
map: false,
processors: [ processors: [
require('autoprefixer')({ require('autoprefixer')({
browsers: ['> 1% in DE'] browsers: ['> 1% in DE']
}) })
] ]
}, },
dev: {
options: {
map: true
},
dist: {
src: 'build/*.css'
}
},
dist: { dist: {
src: 'build/*.css' options: {
map: false
},
dist: {
src: 'build/*.css'
}
} }
}, },
inline: { inline: {

View File

@ -29,7 +29,7 @@ module.exports = function exports(grunt) {
}, },
sass: { sass: {
files: ['scss/**/*.scss'], files: ['scss/**/*.scss'],
tasks: ['sasslint', 'sass', 'postcss'] tasks: ['sasslint', 'sass:dev', 'postcss:dev']
}, },
js: { js: {
files: ['app.js', 'lib/**/*.js'], files: ['app.js', 'lib/**/*.js'],