Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add grunt-image-embed to embed data uri's in CSS #29

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
chrome/button/compiled.css
13 changes: 13 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = function (grunt) {
grunt.initConfig({
imageEmbed: {
dist: {
src: "chrome/button/button.css",
dest: "chrome/button/compiled.css"
}
}
});

grunt.loadNpmTasks('grunt-image-embed');
grunt.registerTask("build", ["imageEmbed"]);
}
49 changes: 39 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
Gittip-Everywhere
=================

The official Gittip extension for the Chrome browser. We enable Gittip giving icons on many of your favorite sites.

This project was inspired by https://github.com/ironchefpython/gittip-browser-extension

## Similar Projects

- [Gittip Button for Github](https://github.com/nathancahill/gittip-button)
Gittip-Everywhere
=================

The official Gittip browser extension. We enable Gittip giving icons on
many of your favorite sites.

Supported sites:

* GitHub (repos)
* Bitbucket (repos)
* Twitter (old profiles)

Supported browsers:

* Chrome

This project was inspired by
https://github.com/ironchefpython/gittip-browser-extension

## Requirements

* NPM: Comes with Nodejs ([Installation Instructions][nodejs-install])

## Build


git clone https://github.com/gittip/Gittip-Everywhere.git
cd Gittip-Everywhere
npm install
# install in chrome or hack hack hack
npm run-script build

## Similar Projects

- [Gittip Button for Github][gittip-button]

<!-- Links -->
[nodejs-install]: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
[gittip-button]: https://github.com/nathancahill/gittip-button
6 changes: 4 additions & 2 deletions chrome/button/button.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
/* GitHub */
.octicon-gittip {
background-image: url('chrome-extension://__MSG_@@extension_id__/icons/gittip16.png');
background-image: url('../icons/heart-coin.svg');
background-size: 16px;
-webkit-filter: grayscale(100%);
height: 16px;
width: 16px;
}

/* BitBucket */
#repo-header .icon.gittip {
background-image: url('chrome-extension://__MSG_@@extension_id__/icons/gittip16.png');
background-image: url('../icons/heart-coin.svg');
background-size: 16px;
-webkit-filter: grayscale(100%);
opacity: .8;
}
Expand Down
56 changes: 56 additions & 0 deletions chrome/icons/heart-coin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"content_scripts": [
{
"css": [ "button/button.css" ],
"css": [ "button/compiled.css" ],
"js": [ "libs/jquery-2.0.2.min.js", "websites/github/github.js" ],
"matches": [ "https://github.com/*" ]
},
Expand All @@ -33,13 +33,12 @@
"matches": [ "https://twitter.com/*" ]
},
{
"css": [ "button/button.css" ],
"css": [ "button/compiled.css" ],
"js": [ "libs/jquery-2.0.2.min.js", "websites/bitbucket/bitbucket.js" ],
"matches": [ "https://bitbucket.org/*" ]
}
],
"web_accessible_resources": [
"icons/gittip16.png",
"websites/twitter/widget.html"
]
}
}
25 changes: 25 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "gittip-everywhere",
"version": "0.0.0",
"description": "The official Gittip browser extension that enables Gittip giving icons on many of your favorite sites.",
"main": "index.js",
"scripts": {
"postinstall": "node_modules/grunt-cli/bin/grunt build",
"build": "node_modules/grunt-cli/bin/grunt build",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git://github.com/gittip/Gittip-Everywhere.git"
},
"author": "Team Gittip",
"bugs": {
"url": "https://github.com/gittip/Gittip-Everywhere/issues"
},
"homepage": "https://www.gittip.com",
"devDependencies": {
"grunt": "^0.4.4",
"grunt-cli": "^0.1.13",
"grunt-image-embed": "^0.3.1"
}
}