This repository has been archived by the owner on Oct 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/hassankhan/emojify.js
- Loading branch information
Showing
13 changed files
with
92 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
before_install: npm install -g grunt-cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Contributing | ||
=== | ||
|
||
## Prerequisites | ||
|
||
1. Install the appropriate [EditorConfig](http://editorconfig.org) plugin for your IDE / editor. This helps keep the code style consistent. | ||
2. Install [PhantomJS](http://phantomjs.org). Make sure it's on your path / available when calling `phantomjs` from the command line. | ||
2. `npm install -g grunt-cli` | ||
3. `npm install` | ||
|
||
## Running the tests | ||
|
||
- All tests: `npm test` | ||
- Just the browser ones: `phantomjs phantom.js` | ||
- Just the Node ones: `grunt test-node` | ||
|
||
## Before creating the pull-request | ||
|
||
Make sure you do the following: | ||
|
||
- Run `grunt` | ||
|
||
Note: The build script will generate new `*.min.{css,js}` files. If, for example, you only changed the JavaScript then don't bother committing `emojify.min.css`. | ||
|
||
## Publishing | ||
|
||
If you have rights to publish to npm, do the following first: | ||
|
||
- Run `update.sh`. This will update the project with the latest emoji from [emoji-cheat-sheet.com](http://www.emoji-cheat-sheet.com). | ||
- Run `grunt` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>jstest</title> | ||
</head> | ||
<body> | ||
|
||
<script src="../../node_modules/jstest/jstest.js"></script> | ||
<script>ROOT = '../..'</script> | ||
<script src="runner.js"></script> | ||
|
||
</body> | ||
</html> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
var chai = require('chai'), | ||
expect = chai.expect, | ||
emojify; | ||
|
||
describe('emojify in a Node environment', function(){ | ||
|
||
beforeEach(function(){ | ||
emojify = require('../../'); | ||
}); | ||
|
||
describe('.replace', function(){ | ||
it('should replace named emoji', function() { | ||
var result = emojify.replace(':smile:'); | ||
expect(result).to.equal("<img title=':smile:' alt=':smile:' class='emoji' src='images/emoji/smile.png' align='absmiddle' />"); | ||
}); | ||
|
||
it('should replace two-character emoji', function(){ | ||
var result = emojify.replace(':)'); | ||
expect(result).to.equal("<img title=':smile:' alt=':smile:' class='emoji' src='images/emoji/smile.png' align='absmiddle' />"); | ||
}); | ||
}); | ||
}); |