Skip to content

Commit

Permalink
Cleaned up gruntfile and am considering js lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lokesh committed Oct 31, 2016
1 parent c9236b1 commit 65fc4c2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 42 deletions.
53 changes: 13 additions & 40 deletions Gruntfile.js
@@ -1,41 +1,23 @@
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: {
port: 8000
}
}
},
'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: {
Expand All @@ -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']);
};
7 changes: 5 additions & 2 deletions dist/color-thief.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 65fc4c2

Please sign in to comment.