bramstein / hypher

A fast and small JavaScript hyphenation engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Languages are now modules

ivanistheone opened this issue · comments

but jquery.hyper.js does not know how to load them.

Uncaught ReferenceError: module is not defined en-us.js:3
(anonymous function)

in en-us.js

clarification: I was using the jquery.hypher.js from dist/ with the latest en-us.js pattern. The en-us.js pattern from the example dir works fine.

Ah, yes. The files in the hyphenation-patterns repository are the source files from which the browser compatible versions are built. The source files are npm modules that are wrapped for use in the browser. I've added a dist/browser directory with the prebuilt browser hyphenation patterns. Hope that solves your problems.

Hummm, I just $ npm install hypher hyphenation.de which gave me:

+ hypher@0.2.5
+ hyphenation.de@0.2.1

Then I included the following scripts in my HTML head:

  • node_modules/hypher/dist/jquery.hypher.js
  • node_modules/hyphenation.de/lib/de.js

And then I get the above error. I don't see any dist/browser directory. How do I fix that error then?

Ooookay, so I had to include bramstein/hyphenation-patterns instead of hyphenation.de.

$ npm install hypher git+https://git@github.com:fluid-project/hyphenation-patterns.git

And then include:

  • node_modules/hypher/dist/jquery.hypher.js
  • node_modules/@fluid-project/hyphenation-patterns/dist/browser/de.js