mirror of
https://github.com/janishutz/color-thief.git
synced 2025-11-25 13:54:25 +00:00
Updated demo page. Added package.json and bower.json.
This commit is contained in:
83
Gruntfile.js
Normal file
83
Gruntfile.js
Normal file
@@ -0,0 +1,83 @@
|
||||
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']);
|
||||
};
|
||||
Reference in New Issue
Block a user