Comments (3)
I'm so far using https://parceljs.org/ (v1 for now as I didn't migrate to v2 yet) to produce the two isolated javascript application bundles on eno-lang.org that use enolib client-side in the browser (the eno playground and enolib playground).
Both bundler invocations can be found in the package scripts for eno-lang.org:
https://github.com/eno-lang/eno-lang.org/blob/a93c4f1ee461668535ae2f9960619bbaa2eb95d7/package.json#L32-L33
The respective files being built (which both import enolib) are playground.js and enolib_playground.js.
I believe in the past I have also used webpack for this, but I'd need to dig around a bit to find that again.
Let me know if these examples/links help you out, fingers crossed! If you want to share your results afterwards (given it's a public thing anyway) I'd be curious to have a look too ;) feel free to post a link if that's the case!
from enolib.
Thanks a lot, it is working! Instead of just glancing at the code, I should have tested the Browserify and Rollup outputs as well - looks like they define a require() function like Parcel. But I will stick with Parcel (used 1.12.5).
I used a file like this:
import enolib, { parse, HtmlReporter, ParseError } from 'enolib';
const test = `name: test`; // imagine multi-line eno data here
const doc = enolib.parse(test);
console.log(doc.field('name').requiredStringValue());
and built with
parcel build enorequire.js --no-source-maps --out-dir ./ --out-file enolib.js
from enolib.
Fantastic, great to hear it's working! :)
from enolib.
Related Issues (7)
- Related Rust parsers HOT 1
- eno file writing HOT 1
- Exception on multiline field HOT 6
- Serialize into a JavaScript object? HOT 3
- Tests failing HOT 7
- C# Parser HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enolib.