projects
/
eg-antora.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d15799
)
use require.resolve instead of path.resolve to resolve path in node_modules
author
Dan Allen
<dan@opendevise.com>
Fri, 7 Jun 2019 05:15:00 +0000
(23:15 -0600)
committer
Dan Allen
<dan@opendevise.com>
Fri, 7 Jun 2019 05:15:00 +0000
(23:15 -0600)
gulp.d/tasks/build.js
patch
|
blob
|
history
diff --git
a/gulp.d/tasks/build.js
b/gulp.d/tasks/build.js
index
89ff28d
..
2f471c4
100644
(file)
--- a/
gulp.d/tasks/build.js
+++ b/
gulp.d/tasks/build.js
@@
-28,7
+28,7
@@
module.exports = (src, dest, preview) => () => {
filter: '**/~typeface-*/files/*',
url: (asset) => {
const relpath = asset.pathname.substr(1)
- const abspath =
ospath.resolve('node_modules',
relpath)
+ const abspath =
require.resolve(
relpath)
const basename = ospath.basename(abspath)
const destpath = ospath.join(dest, 'font', basename)
if (!fs.pathExistsSync(destpath)) fs.copySync(abspath, destpath)