Commit eb32370bf8cbd70b2d74afd663eeb9616fa35a03
Merge branch 'master' of github.com:ssbc/patchbay
mix irving committed on 6/1/2017, 8:25:20 AMParent: 09c0a2e49ccc68a4cdc3a98da00657c1aff6158b
Parent: 9ec32b65bdd8f625866616dc536cf25c26c163bc
Files changed
app/styles/css/font-awesome.js | changed |
package.json | changed |
app/styles/css/font-awesome.js | |||
---|---|---|---|
@@ -1,12 +1,13 @@ | |||
1 | 1 … | const nest = require('depnest') | |
2 | 2 … | const fs = require('fs') | |
3 | -const { join } = require('path') | ||
3 … | +const { join, dirname } = require('path') | ||
4 | 4 … | const { assign } = Object | |
5 … | +const styleResolve = require('style-resolve') | ||
5 | 6 … | ||
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)) | ||
9 | 10 … | ||
10 | 11 … | // TODO: for patchlite, may have to convert font urls into url(data:base64: ....) format | |
11 | 12 … | ||
12 | 13 … | exports.gives = nest('styles.css') |
Built with git-ssb-web