Cleaned up gruntfile and am considering js lint

This commit is contained in:
Lokesh Dhakar
2016-10-30 20:23:54 -07:00
parent c9236b189d
commit 65fc4c26b5
2 changed files with 18 additions and 42 deletions

View File

@@ -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']);
};