Skip to content

Commit

Permalink
Proposal for foliojs#77 - support using the module in webpack
Browse files Browse the repository at this point in the history
This uses the existing trie generation scripts to also generate a JS
module that exports the contents of the trie as a Buffer. This should
allow tools like webpack to successfully package fontkit and allow it to
be required as a module.

Prior to this, webpack could package it fine, but when the generated
bundle executes and tries to import fontkit, it throws an error because
of the load-time fs.readFileSync calls.
  • Loading branch information
mearns committed Feb 5, 2019
1 parent 2d1b0eb commit a1ca654
Show file tree
Hide file tree
Showing 11 changed files with 17,990 additions and 2,041 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -4,11 +4,14 @@ playground/
coverage/
coverage.html
data.trie
data.trie.js
/index.js
/base.js
*.js.map
use.trie
use.trie.js
use.json
.nyc_output
indic.trie
indic.trie.js
indic.json
66 changes: 66 additions & 0 deletions base-umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a1ca654

Please sign in to comment.