Files
color-thief/Gruntfile.js
2014-04-08 01:22:14 -04:00

83 lines
1.8 KiB
JavaScript

module.exports = function(grunt) {
grunt.initConfig({
host_config: grunt.file.readJSON('.host_config'),
compass: {
dist: {
options: {
sassDir: 'sass',
cssDir: 'css',
environment: 'production'
}
}
},
connect: {
server: {
options: {
port: 8000
}
}
},
'ftp-deploy': {
build: {
auth: {
host: '<%- host_config.host %>',
port: '<%- host_config.port %>'
},
src: '.',
dest: '<%- host_config.directory %>',
exclusions: [
'.DS_Store',
'.sass-cache',
'.git*',
'.host_config',
'.ftppass',
'node_modules',
'sass',
'Gruntfile.js',
'package.json',
'README.markdown'
]
}
},
jshint: {
files: ['js/color-thief.js']
},
uglify: {
options: {
preserveComments: 'some',
sourceMap: true
},
dist: {
files: {
'js/color-thief.min.js': ['js/color-thief.js']
}
}
},
watch: {
sass: {
files: ['sass/*.sass'],
tasks: ['compass'],
options: {
livereload: true,
spawn: false
},
},
test: {
files: ['js/color-thief.js'],
tasks: ['jshint']
}
}
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-ftp-deploy');
grunt.registerTask('default', ['compass', 'connect', 'watch']);
grunt.registerTask('build', ['compass', 'jshint', 'uglify']);
};