mirror of
https://github.com/janishutz/color-thief.git
synced 2025-11-25 05:44:24 +00:00
Reorganize files for Bower distro
This commit is contained in:
26
Gruntfile.js
26
Gruntfile.js
@@ -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
12
HISTORY.md
Normal 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
|
||||
@@ -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.
|
||||
13
bower.json
13
bower.json
@@ -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
1
dist/color-thief.min.map
vendored
Normal file
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
@@ -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
|
||||
0
js/jquery.js → examples/js/jquery.js
vendored
0
js/jquery.js → examples/js/jquery.js
vendored
11
index.html
11
index.html
@@ -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
18
package.json
18
package.json
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user