Reorganize files for Bower distro

This commit is contained in:
Lokesh Dhakar
2014-04-17 11:07:23 -07:00
parent cb5c9c6ca8
commit 9cbad46067
19 changed files with 54 additions and 39 deletions

View File

@@ -5,8 +5,8 @@ module.exports = function(grunt) {
compass: {
dist: {
options: {
sassDir: 'sass',
cssDir: 'css',
sassDir: 'examples/sass',
cssDir: 'examples/css',
environment: 'production'
}
}
@@ -27,21 +27,15 @@ module.exports = function(grunt) {
src: '.',
dest: '<%- host_config.directory %>',
exclusions: [
'.DS_Store',
'.sass-cache',
'.git*',
'.host_config',
'.ftppass',
'node_modules',
'sass',
'Gruntfile.js',
'package.json',
'README.markdown'
'**/.*',
'.*',
'bower_components',
'node_modules'
]
}
},
jshint: {
files: ['js/color-thief.js']
files: ['src/color-thief.js']
},
uglify: {
options: {
@@ -50,13 +44,13 @@ module.exports = function(grunt) {
},
dist: {
files: {
'js/color-thief.min.js': ['js/color-thief.js']
'dist/color-thief.min.js': ['src/color-thief.js']
}
}
},
watch: {
sass: {
files: ['sass/*.sass'],
files: ['examples/sass/*.sass'],
tasks: ['compass'],
options: {
livereload: true,
@@ -64,7 +58,7 @@ module.exports = function(grunt) {
},
},
test: {
files: ['js/color-thief.js'],
files: ['src/color-thief.js'],
tasks: ['jshint']
}
}

12
HISTORY.md Normal file
View File

@@ -0,0 +1,12 @@
v2.0.0
---
- Embed quantize into color thief file
- Strip out jQuery requirement
- Credit those who helped with edits - Nathan Spady for drag and drop support.
#### Examples
- Don't show yellow circle buttons till images have loaded
- Add FB and Twitter buttons
- Add drag n drop support
- Make design responsive
- Touch support on demo page

View File

@@ -47,4 +47,4 @@ by Lokesh Dhakar
Licensed under the [Creative Commons Attribution 2.5 License](http://creativecommons.org/licenses/by/2.5/)
* Free for use in both personal and commercial projects.
* Attribution requires leaving author name, author homepage link, and the license info intact.
* Attribution requires leaving author name, author homepage link, and the license info intact.

View File

@@ -1,23 +1,24 @@
{
"name": "color-thief",
"version": "2.1.0",
"version": "2.0.0",
"homepage": "http://lokeshdhakar.com/projects/color-thief/",
"authors": [
"Lokesh Dhakar <lokesh.dhakar@gmail.com>"
"Lokesh Dhakar"
],
"description": "Grab the dominant color or color palette from an image.",
"main": "js/color-thief.js",
"keywords": [
"color",
"palette",
"picker",
"thief",
"dominant"
"sampling",
"image",
"picture",
"photo",
"canvas"
],
"license": "CC BY 2.5",
"ignore": [
"**/.*",
"Gruntfile.js",
"node_modules",
"bower_components",
"test",

1
dist/color-thief.min.map vendored Normal file

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

View File

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 137 KiB

View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -9,9 +9,9 @@ $(document).ready(function () {
// Color Thief demo code
// ---------------------
var imageArray = {images: [
{'file': 'img/photo1.jpg'},
{'file': 'img/photo2.jpg'},
{'file': 'img/photo3.jpg'}
{'file': 'examples/img/photo1.jpg'},
{'file': 'examples/img/photo2.jpg'},
{'file': 'examples/img/photo3.jpg'}
]};
// Render example images
@@ -47,8 +47,10 @@ $(document).ready(function () {
elapsedTimeForGetPalette: elapsedTimeForGetPalette
};
var colorThiefOuputHTML = Mustache.to_html($('#color-thief-output-template').html(), colorThiefOutput);
$imageSection.addClass('with-color-thief-output');
$imageSection.find('.run-functions-button').addClass('hide');
setTimeout(function(){
$imageSection.find('.color-thief-output').append(colorThiefOuputHTML).slideDown();
// If the color-thief-output div is not in the viewport or cut off, scroll down.
@@ -59,7 +61,6 @@ $(document).ready(function () {
$('body').animate({scrollTop: outputOffsetTop - windowHeight + 200 + "px"});
}
}, 300);
};
// Drag'n'drop demo

View File

@@ -10,9 +10,8 @@
<meta name="author" content="Lokesh Dhakar">
<meta name="viewport" content="width=device-width,initial-scale=1">
<script src="js/libs/modernizr.custom.js"></script>
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Karla%7CMontserrat:700">
<link rel="stylesheet" href="css/screen.css">
<link rel="stylesheet" href="examples/css/screen.css">
</head>
<body>
@@ -106,10 +105,10 @@
</script>
<script src="js/jquery.js"></script>
<script src="js/mustache.js"></script>
<script src="js/color-thief.js"></script>
<script src="js/demo.js"></script>
<script src="src/color-thief.js"></script>
<script src="examples/js/jquery.js"></script>
<script src="examples/js/mustache.js"></script>
<script src="examples/js/demo.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];

File diff suppressed because one or more lines are too long

View File

@@ -1,14 +1,21 @@
{
"name": "color-thief",
"version": "2.1.0",
"author": "Lokesh Dhakar",
"version": "2.0.0",
"private": true,
"author": {
"name": "Lokesh Dhakar",
"email": "lokesh.dhakar@gmail.com",
"url": "http://lokeshdhakar.com/"
},
"description": "Get the dominant color or color palette from an image.",
"keywords": [
"color",
"palette",
"picker",
"thief",
"dominant"
"sampling",
"image",
"picture",
"photo",
"canvas"
],
"homepage": "http://lokeshdhakar.com/projects/color-thief/",
"repository": {
@@ -24,6 +31,7 @@
"url": "http://creativecommons.org/licenses/by/2.5/"
}
],
"main": "dist/color-thief.min.js",
"devDependencies": {
"grunt": "~0.4.2",
"grunt-contrib-compass": "^0.7.2",