levelgraph / levelgraph-n3

LevelGraph plugin for storing N3/Turtle/RDF data
36 stars 8 forks source link

problem with min build #10

Closed edrex closed 10 years ago

edrex commented 10 years ago

With levelgraph-n3 0.3.2 installed via bower, using levelgraph-n3.min.js, I get the following error when calling n3Db.n3.put. Only happens with minified file.

SyntaxError: Invalid regular expression: /^((?:[A-Za-zÀ-ÖØ-öø-Ë¿Í°-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�]|[í €-í­¿][í°€-í¿¿])(?:[\.\-0-9A-Z_a-z·À-ÖØ-öø-ͽͿ-῿‌‍‿⁀⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�]|[í €-í­¿][í°€-í¿¿])*)?:(?=\s)/: Range out of order in character class
    at new RegExp (native)
    at Object.<anonymous> (http://localhost:8080/lib/levelgraph-n3/build/levelgraph-n3.min.js:4:16872)
    at s (http://localhost:8080/lib/levelgraph-n3/build/levelgraph-n3.min.js:1:518)
    at http://localhost:8080/lib/levelgraph-n3/build/levelgraph-n3.min.js:1:569
    at Object../N3Lexer.js (http://localhost:8080/lib/levelgraph-n3/build/levelgraph-n3.min.js:4:24350)
    at s (http://localhost:8080/lib/levelgraph-n3/build/levelgraph-n3.min.js:1:518)
    at http://localhost:8080/lib/levelgraph-n3/build/levelgraph-n3.min.js:1:569
    at Object../N3Parser.js (http://localhost:8080/lib/levelgraph-n3/build/levelgraph-n3.min.js:5:6636)
    at s (http://localhost:8080/lib/levelgraph-n3/build/levelgraph-n3.min.js:1:518)
    at http://localhost:8080/lib/levelgraph-n3/build/levelgraph-n3.min.js:1:569 

I will probably switch to browserify for build soon anyway.

PS I'm doing a dive with levelgraph http://edrex.github.io/levelgraph-dive/, might end up being a good external example.

mcollina commented 10 years ago

@elf-pavlik and me were thinking about building a 'LevelGraph Playground'. That seems like a good step forward! Keep working on it! If you want to contribute by building a LevelGraph website with associated playground, I will be extremely grateful :).

I don't know what the problem is with the build :/. It seems a browserify bug. Can you please try rebuilding it yourself with the latest browserify?

edrex commented 10 years ago

Sorry, I went down a tooling rabbit hole. I am using webpack now.

Failing test case: https://gist.github.com/edrex/c8b06cb43830893937f4

Rebuilding fixed it. PR #11. Included non-min build for consistency. But maybe you want to do the build yourself @mcollina, since it's not very code-review-able.