Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
fix: hide globby error
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 5, 2018
1 parent 8c1ec9d commit ee7aef4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ export namespace Manifest {
export type FindCommandCB = (id: string) => Command.Class

export function build(version: string, dir: string, findCommand: FindCommandCB): Manifest {
const globby: typeof Globby = require('globby')
let globby: typeof Globby
try {
globby = require('globby')
} catch {
debug('not loading plugins, globby not found')
return {} as any
}
debug(`loading IDs from ${dir}`)
const ids = globby.sync(['**/*.+(js|ts)', '!**/*.+(d.ts|test.ts|test.js)'], {cwd: dir})
.map(file => {
Expand Down

0 comments on commit ee7aef4

Please sign in to comment.