mirror of
https://github.com/janishutz/color-thief.git
synced 2025-11-25 13:54:25 +00:00
Cleaned up gruntfile and am considering js lint
This commit is contained in:
53
Gruntfile.js
53
Gruntfile.js
@@ -1,16 +1,6 @@
|
||||
module.exports = function(grunt) {
|
||||
|
||||
grunt.initConfig({
|
||||
host_config: grunt.file.readJSON('.host_config'),
|
||||
compass: {
|
||||
dist: {
|
||||
options: {
|
||||
sassDir: 'examples/sass',
|
||||
cssDir: 'examples/css',
|
||||
environment: 'production'
|
||||
}
|
||||
}
|
||||
},
|
||||
connect: {
|
||||
server: {
|
||||
options: {
|
||||
@@ -18,24 +8,16 @@ module.exports = function(grunt) {
|
||||
}
|
||||
}
|
||||
},
|
||||
'ftp-deploy': {
|
||||
build: {
|
||||
auth: {
|
||||
host: '<%- host_config.host %>',
|
||||
port: '<%- host_config.port %>'
|
||||
},
|
||||
src: '.',
|
||||
dest: '<%- host_config.directory %>',
|
||||
exclusions: [
|
||||
'**/.*',
|
||||
'.*',
|
||||
'bower_components',
|
||||
'node_modules'
|
||||
]
|
||||
}
|
||||
},
|
||||
jshint: {
|
||||
files: ['src/color-thief.js']
|
||||
},
|
||||
jscs: {
|
||||
src: [
|
||||
'src/color-thief.js'
|
||||
],
|
||||
options: {
|
||||
config: ".jscsrc"
|
||||
}
|
||||
},
|
||||
uglify: {
|
||||
options: {
|
||||
@@ -49,29 +31,20 @@ module.exports = function(grunt) {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
sass: {
|
||||
files: ['examples/sass/*.sass'],
|
||||
tasks: ['compass'],
|
||||
options: {
|
||||
livereload: true,
|
||||
spawn: false
|
||||
},
|
||||
},
|
||||
test: {
|
||||
files: ['src/color-thief.js'],
|
||||
tasks: ['jshint']
|
||||
tasks: ['jshint', 'jscs']
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
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.loadNpmTasks('grunt-jscs');
|
||||
|
||||
|
||||
grunt.registerTask('default', ['compass', 'connect', 'watch']);
|
||||
grunt.registerTask('build', ['compass', 'jshint', 'uglify']);
|
||||
grunt.registerTask('default', ['connect', 'watch']);
|
||||
grunt.registerTask('test', ['jshint', 'jscs']);
|
||||
grunt.registerTask('build', ['uglify']);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user