From e661a0f9a380fb4c5e65380249b96f4090264d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=9F=D1=80=D0=B8=D0=BC=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Mon, 23 Mar 2020 22:06:53 +0300 Subject: [PATCH] change hbs & glob path --- src/index.js | 2 +- src/templates/dev.hbs | 1 + src/templates/index.hbs | 1 + src/templates/partials/header.hbs | 1 - src/utils/registerPartialsWithExtensions.js | 2 +- 5 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index eb2f978..cc0e769 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ const path = require('path'); -const hbs = require(path.resolve('node_modules', 'hbs')); +const hbs = require('hbs'); const registerPartialsWithExtensions = require('./utils/registerPartialsWithExtensions'); diff --git a/src/templates/dev.hbs b/src/templates/dev.hbs index 8c2f389..a9509b3 100644 --- a/src/templates/dev.hbs +++ b/src/templates/dev.hbs @@ -3,6 +3,7 @@ {{>"partials/header.hbs"}} + {{ pageTitle }} diff --git a/src/templates/index.hbs b/src/templates/index.hbs index 3f82eb6..7b33c3e 100644 --- a/src/templates/index.hbs +++ b/src/templates/index.hbs @@ -3,6 +3,7 @@ {{>"partials/header.hbs"}} + {{ pageTitle }} diff --git a/src/templates/partials/header.hbs b/src/templates/partials/header.hbs index 9c3d487..63ef7f4 100644 --- a/src/templates/partials/header.hbs +++ b/src/templates/partials/header.hbs @@ -3,4 +3,3 @@ rel="stylesheet" /> -{{ pageTitle }} \ No newline at end of file diff --git a/src/utils/registerPartialsWithExtensions.js b/src/utils/registerPartialsWithExtensions.js index b0c45dc..c4c540d 100644 --- a/src/utils/registerPartialsWithExtensions.js +++ b/src/utils/registerPartialsWithExtensions.js @@ -1,7 +1,7 @@ const fs = require('fs'); const path = require('path'); -const glob = require(path.resolve('node_modules', 'glob')); +const glob = require('glob'); module.exports = (hbs, rootDir) => { glob