Skip to content

Commit

Permalink
Reorganize files for Bower distro
Browse files Browse the repository at this point in the history
  • Loading branch information
lokesh committed Apr 17, 2014
1 parent cb5c9c6 commit 9cbad46
Show file tree
Hide file tree
Showing 19 changed files with 54 additions and 39 deletions.
26 changes: 10 additions & 16 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ module.exports = function(grunt) {
compass: {
dist: {
options: {
sassDir: 'sass',
cssDir: 'css',
sassDir: 'examples/sass',
cssDir: 'examples/css',
environment: 'production'
}
}
Expand All @@ -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: {
Expand All @@ -50,21 +44,21 @@ 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,
spawn: false
},
},
test: {
files: ['js/color-thief.js'],
files: ['src/color-thief.js'],
tasks: ['jshint']
}
}
Expand Down
12 changes: 12 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion README.markdown → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 7 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions dist/color-thief.min.map

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

File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
9 changes: 5 additions & 4 deletions js/demo.js → examples/js/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -59,7 +61,6 @@ $(document).ready(function () {
$('body').animate({scrollTop: outputOffsetTop - windowHeight + 200 + "px"});
}
}, 300);

};

// Drag'n'drop demo
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 5 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -106,10 +105,10 @@ <h3 class="function-title">Palette</h3>
</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 || [];
Expand Down
Loading

0 comments on commit 9cbad46

Please sign in to comment.