Skip to content

Commit

Permalink
rollback to using glob (from fast-glob). #300
Browse files Browse the repository at this point in the history
  • Loading branch information
75lb committed Jul 24, 2024
1 parent 40abc86 commit 8736280
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 243 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ function generate (templateData, options) {
const DmdOptions = require('./lib/dmd-options')

function registerPartials (paths) {
const files = fastGlob.globSync(paths, { onlyFiles: true })
for (const file of files) {
const fileSet = new FileSet(paths)
for (const file of fileSet.files) {
handlebars.registerPartial(
path.basename(file, '.hbs'),
fs.readFileSync(file, 'utf8') || ''
Expand All @@ -62,8 +62,8 @@ function generate (templateData, options) {
}

function registerHelpers (helpers) {
const files = fastGlob.globSync(helpers, { onlyFiles: true })
for (const file of files) {
const fileSet = new FileSet(helpers)
for (const file of fileSet.files) {
handlebars.registerHelper(require(path.resolve(process.cwd(), file)))
}
}
Expand Down
Loading

0 comments on commit 8736280

Please sign in to comment.