git ssb

16+

Dominic / patchbay



Commit 9ec32b65bdd8f625866616dc536cf25c26c163bc

Merge pull request #115 from ssbc/fix-font-paths

fix font paths using resolved absolute paths
mix irving authored on 5/30/2017, 1:06:31 PM
GitHub committed on 5/30/2017, 1:06:31 PM
Parent: 83daafefa24d872648e249940f470bafcfaab662
Parent: 53d03c145268665aa93e60777b4153a8a0c4dca5

Files changed

app/styles/css/font-awesome.jschanged
package.jsonchanged
app/styles/css/font-awesome.jsView
@@ -1,12 +1,13 @@
11 const nest = require('depnest')
22 const fs = require('fs')
3-const { join } = require('path')
3 +const { join, dirname } = require('path')
44 const { assign } = Object
5 +const styleResolve = require('style-resolve')
56
6-// const css = fs.readFileSync(join(__dirname, '../../../node_modules/font-awesome/css/font-awesome.min.css'), 'utf8')
7-const css = fs.readFileSync(join(__dirname, '../../../node_modules/font-awesome/css/font-awesome.css'), 'utf8')
8- .replace(/\.{2}/g, '../font-awesome')
7 +const fontCssPath = styleResolve.sync('font-awesome')
8 +const css = fs.readFileSync(fontCssPath, 'utf8')
9 + .replace(/\.{2}/g, (match) => join(dirname(fontCssPath), match))
910
1011 // TODO: for patchlite, may have to convert font urls into url(data:base64: ....) format
1112
1213 exports.gives = nest('styles.css')
package.jsonView
@@ -62,8 +62,9 @@
6262 "read-directory": "^2.0.0",
6363 "setimmediate": "^1.0.5",
6464 "ssb-horcrux": "^0.1.3",
6565 "ssb-mentions": "^0.1.1",
66 + "style-resolve": "^1.0.1",
6667 "suggest-box": "^2.2.3",
6768 "text-node-searcher": "^1.1.1",
6869 "xtend": "^4.0.1"
6970 },

Built with git-ssb-web