|
@ -5,7 +5,8 @@ module.exports = function(grunt){ |
|
|
// Configurable paths
|
|
|
// Configurable paths
|
|
|
var config = { |
|
|
var config = { |
|
|
tmp: '.tmp', |
|
|
tmp: '.tmp', |
|
|
base: 'couchpotato' |
|
|
base: 'couchpotato', |
|
|
|
|
|
css_dest: 'couchpotato/static/style/combined.min.css' |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
grunt.initConfig({ |
|
|
grunt.initConfig({ |
|
@ -29,23 +30,15 @@ module.exports = function(grunt){ |
|
|
// Compiles Sass to CSS and generates necessary files if requested
|
|
|
// Compiles Sass to CSS and generates necessary files if requested
|
|
|
sass: { |
|
|
sass: { |
|
|
options: { |
|
|
options: { |
|
|
compass: true |
|
|
compass: true, |
|
|
}, |
|
|
update: true |
|
|
dist: { |
|
|
|
|
|
files: [{ |
|
|
|
|
|
expand: true, |
|
|
|
|
|
cwd: '<%= config.base %>/styles', |
|
|
|
|
|
src: ['*.scss'], |
|
|
|
|
|
dest: '<%= config.tmp %>/styles', |
|
|
|
|
|
ext: '.css' |
|
|
|
|
|
}] |
|
|
|
|
|
}, |
|
|
}, |
|
|
server: { |
|
|
server: { |
|
|
files: [{ |
|
|
files: [{ |
|
|
expand: true, |
|
|
expand: true, |
|
|
cwd: '<%= config.base %>/', |
|
|
cwd: '<%= config.base %>/', |
|
|
src: ['**/*.scss'], |
|
|
src: ['**/*.scss'], |
|
|
dest: '<%= config.tmp %>/styles', |
|
|
dest: '<%= config.tmp %>/styles/', |
|
|
ext: '.css' |
|
|
ext: '.css' |
|
|
}] |
|
|
}] |
|
|
} |
|
|
} |
|
@ -66,13 +59,11 @@ module.exports = function(grunt){ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
concat: { |
|
|
cssmin: { |
|
|
options: { |
|
|
|
|
|
separator: '' |
|
|
|
|
|
}, |
|
|
|
|
|
dist: { |
|
|
dist: { |
|
|
src: ['<%= config.tmp %>/styles/**/*.css'], |
|
|
files: { |
|
|
dest: '<%= config.tmp %>/test.css' |
|
|
'<%= config.css_dest %>': ['<%= config.tmp %>/styles/**/*.css'] |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -80,7 +71,7 @@ module.exports = function(grunt){ |
|
|
watch: { |
|
|
watch: { |
|
|
scss: { |
|
|
scss: { |
|
|
files: ['**/*.{scss,sass}'], |
|
|
files: ['**/*.{scss,sass}'], |
|
|
tasks: ['sass:server', 'autoprefixer', 'concat'], |
|
|
tasks: ['sass:server', 'autoprefixer', 'cssmin'], |
|
|
options: { |
|
|
options: { |
|
|
'livereload': true |
|
|
'livereload': true |
|
|
} |
|
|
} |
|
@ -101,7 +92,6 @@ module.exports = function(grunt){ |
|
|
files: [ |
|
|
files: [ |
|
|
'<%= config.base %>/{,*/}*.html', |
|
|
'<%= config.base %>/{,*/}*.html', |
|
|
'<%= config.tmp %>/styles/{,*/}*.css', |
|
|
'<%= config.tmp %>/styles/{,*/}*.css', |
|
|
'<%= config.base %>/react/{,*/}*.js', |
|
|
|
|
|
'<%= config.base %>/images/{,*/}*' |
|
|
'<%= config.base %>/images/{,*/}*' |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
@ -111,7 +101,7 @@ module.exports = function(grunt){ |
|
|
options: { |
|
|
options: { |
|
|
logConcurrentOutput: true |
|
|
logConcurrentOutput: true |
|
|
}, |
|
|
}, |
|
|
tasks: ['sass:server', 'watch'] |
|
|
tasks: ['sass:server', 'autoprefixer', 'cssmin', 'watch'] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
@ -119,12 +109,11 @@ module.exports = function(grunt){ |
|
|
grunt.loadNpmTasks('grunt-contrib-jshint'); |
|
|
grunt.loadNpmTasks('grunt-contrib-jshint'); |
|
|
//grunt.loadNpmTasks('grunt-contrib-uglify');
|
|
|
//grunt.loadNpmTasks('grunt-contrib-uglify');
|
|
|
grunt.loadNpmTasks('grunt-contrib-sass'); |
|
|
grunt.loadNpmTasks('grunt-contrib-sass'); |
|
|
//grunt.loadNpmTasks('grunt-contrib-cssmin');
|
|
|
grunt.loadNpmTasks('grunt-contrib-cssmin'); |
|
|
grunt.loadNpmTasks('grunt-contrib-watch'); |
|
|
grunt.loadNpmTasks('grunt-contrib-watch'); |
|
|
grunt.loadNpmTasks('grunt-autoprefixer'); |
|
|
grunt.loadNpmTasks('grunt-autoprefixer'); |
|
|
grunt.loadNpmTasks('grunt-concurrent'); |
|
|
grunt.loadNpmTasks('grunt-concurrent'); |
|
|
grunt.loadNpmTasks('grunt-contrib-concat'); |
|
|
|
|
|
|
|
|
|
|
|
grunt.registerTask('default', ['sass', 'concurrent']); |
|
|
grunt.registerTask('default', ['concurrent']); |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|