Giter VIP home page Giter VIP logo

Comments (7)

olafurpg avatar olafurpg commented on May 13, 2024

FWIW, in monadic-html we have a Scala.js compatible version of scala-xml implemented in 200 LOC with some additional type-safety for what can be embedded in element or attribute position. See https://github.com/OlivierBlanvillain/monadic-html/blob/master/monadic-html/src/main/scala/scala/xml/xml.scala

If you drop the type-safety features, it's ~100 LOC.

Note. This does not include an xml pretty printer.

from korolev.

fomkin avatar fomkin commented on May 13, 2024

@olafurpg wow, looking great. Do you have a plan to publish your scala.xml implementation as single artifact both for scala.jvm and scala.js?

from korolev.

olafurpg avatar olafurpg commented on May 13, 2024

I don't think we'll publish it as a standalone library for jvm+js, it's at least outside the scope of monadic-html.

It should be trivial to move it to a separate repo however and publish for jvm + js. It's a single file, MIT licenced. The only shame is that it occupies the scala.xml global namespace. You'd have to remove the mhtml specific typeclass instances for Xml{Element,Attribute}Embeddable. We keep the instances on the companion objects to avoid forcing an import on users.

from korolev.

fomkin avatar fomkin commented on May 13, 2024

👍

from korolev.

olafurpg avatar olafurpg commented on May 13, 2024

We can discuss later about consolidating implementations if namespace conflicts end up being a problem.

from korolev.

fomkin avatar fomkin commented on May 13, 2024

Out of scope of Korolev. Moved to https://github.com/fomkin/levsha

from korolev.

fomkin avatar fomkin commented on May 13, 2024

fomkin/levsha#1

from korolev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.