feat: Switch out js-emoji for habtiica-markdown

This commit is contained in:
Blade Barringer 2016-04-26 08:19:47 -05:00
parent b86348dd0e
commit e7315253dd
8 changed files with 3 additions and 18 deletions

View file

@ -36,12 +36,11 @@
"jquery-colorbox": "1.4.36",
"jquery-ui": "1.10.3",
"jquery.cookie": "1.4.0",
"js-emoji": "snicker/js-emoji#f25d8a303f",
"ngInfiniteScroll": "1.0.0",
"pnotify": "1.3.1",
"sticky": "*",
"swagger-ui": "wordnik/swagger-ui#v2.0.24",
"habitica-markdown": "^1.0.0"
"habitica-markdown": "habitrpg/habitica-markdown#emoji"
},
"devDependencies": {
"angular-mocks": "1.3.9"

View file

@ -7,15 +7,11 @@
var md = function () {
var mdown = window.habiticaMarkdown;
emoji.img_path = 'common/img/emoji/unicode/';
var toHtml = function (markdown) {
if (markdown == undefined)
return '';
markdown = mdown.render(markdown);
markdown = emoji.replace_colons(markdown);
markdown = emoji.replace_unified(markdown);
return markdown;
};

View file

@ -32,7 +32,6 @@ module.exports = function karmaConfig (config) {
'website/public/bower_components/select2/select2.js',
'website/public/bower_components/angular-ui-select2/src/select2.js',
'website/public/bower_components/habitica-markdown/dist/habitica-markdown.min.js',
'website/public/bower_components/js-emoji/emoji.js',
'common/dist/scripts/habitrpg-shared.js',
'test/spec/mocks/**/*.js',

View file

@ -154,7 +154,7 @@ describe('notificationServices', function() {
expect($.pnotify).to.have.been.calledOnce;
expect(arg.type).to.eql('info');
expect(arg.text).to.eql('<p><span class="emoji" style="background-image:url(common/img/emoji/unicode/1f604.png)">:smile:</span> - task name</p>\n');
expect(arg.text).to.eql('<p><img class="habitica-emoji" style="height: 1.5em; width: 1.5em" src="https://s3.amazonaws.com/habitica-assets/cdn/emoji/smile.png" alt="smile"> - task name</p>\n');
expect(arg.icon).to.eql(false);
});

View file

@ -5,7 +5,6 @@
// Import only styles that do not have urls to images! Include them directly in the page!
@import "../bower_components/bootstrap-tour/build/css/bootstrap-tour.min.css"
@import "../bower_components/angular-loading-bar/build/loading-bar.css"
@import "../bower_components/js-emoji/emoji.css"
@import "../bower_components/select2/select2.css"
// Custom includes
@ -201,5 +200,5 @@ a.label
*
image-rendering: pixelated
.img-rendering-auto, .img-rendering-auto *, .emoji
.img-rendering-auto, .img-rendering-auto *, .habitica-emoji
image-rendering: auto

View file

@ -234,12 +234,6 @@ for $stage in $stages
markdown > ul > li // Otherwise, + gets turned into a bullet and gets masked by buttons
margin-left:20px
span.emoji
width:1.5em
height:1.5em
background-size:1.5em
vertical-align: middle
// when a task is being dragged
.task.ui-sortable-helper
box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 0 5px rgba(0,0,0,0.1)

View file

@ -15,7 +15,6 @@
"bower_components/angular-loading-bar/build/loading-bar.js",
"bower_components/Angular-At-Directive/src/at.js",
"bower_components/Angular-At-Directive/src/caret.js",
"bower_components/js-emoji/emoji.js",
"bower_components/sticky/jquery.sticky.js",
"bower_components/ngInfiniteScroll/build/ng-infinite-scroll.min.js",
"bower_components/select2/select2.js",

View file

@ -148,7 +148,6 @@ if (cores!==0 && cluster.isMaster && (isDev || isProd)) {
oldApp.use(passport.session());
var maxAge = isProd ? 31536000000 : 0;
// Cache emojis without copying them to build, they are too many
oldApp.use(express['static'](path.join(__dirname, "/../build"), { maxAge: maxAge }));
oldApp.use('/common/dist', express['static'](publicDir + "/../../common/dist", { maxAge: maxAge }));
oldApp.use('/common/audio', express['static'](publicDir + "/../../common/audio", { maxAge: maxAge }));