Code Monkey home page Code Monkey logo

Comments (6)

odensc avatar odensc commented on June 9, 2024

Maybe vmd-viewer, vmd-app, vmd-markdown or something like that.

from vmd.

yoshuawuyts avatar yoshuawuyts commented on June 9, 2024

vmd-markdown, vmd-md, vmd-npm, visual-markdown, view-markdown, varying-meat-dice, vexing-musk-dispenser ?

from vmd.

ikuraj avatar ikuraj commented on June 9, 2024

I presume the package is not yet in AUR? (I think vmd-markdown would be a good name.)

from vmd.

maxkueng avatar maxkueng commented on June 9, 2024

@kaptoxic Yeah, I'm still hesitating. The problem is that there is some logic (though little) inside bin/cli.js. This would mean that the AUR package would depend on both Node.js and Electron. Electron already contains Node so depending on a second time just to launch Electron would be a bit much.

I haven't yet figured out the best way to do it. There are several ways to create the package:

vmd as-is

Use vmd as-is and install Node just for bin/cli.js and Electron for the rest.

Pros:

  • Easy

Cons:

  • Large footprint because it depends on Electron and Node.js

Don't use bin/cli.js in the AUR package

Create a separate entry script in Bash that does the same as bin/cli.js but doesn't depend on Node.js.

Pros:

  • Doesn't depend on Node.js

Cons:

  • The entry script would have to be maintained separately and always updated with the functionality from bin/cli.js.

Separate vmd from Node

Update vmd so that vmd itself (all the stuff the runs inside Electron) is separated from the rest. This means that the package.json can not include the electron-prebuilt dependency and has to be separate. But then vmd could be launched with any compatible version of Electron like electron vmd/server.js my-markdown.md.

Pros:

  • Easy to maintain AUR package
  • Clean and modular solution
  • Independent from Node
  • Must not necessarily be bundled with Electron (could use shared binary) or could even be used with alternatives to Electron (or forks) with a compatible API or a compatibility layer
  • Electron and vmd could be updated independently
  • vmd could theoretically be made to auto-update

Cons:

  • A lot of work and will need structural changes
  • Two separate projects/packages needed:
    • The code that runs inside Electron needs to be a separate package
    • The package that's published on npm will then depend on electron-prebuilt and the new package, and include the bin/cli.js entry file

from vmd.

ikuraj avatar ikuraj commented on June 9, 2024

I am not confident about what would be the right decision (nor am I familiar with JS frameworks), but it seems that the solution with the smallest footprint/least internal dependencies (third one) is the right way to go. If I understood correctly, in that case, some work is required and the package would just depend on existing AUR packages (e.g. electron).

from vmd.

maxkueng avatar maxkueng commented on June 9, 2024

@kaptoxic I moved the logic from bin/cli.js (aa0f54f) and it should now be possible to create an AUR package without Node.js. It's still needed as a build dependency but it will be removed after installation unless you have installed it explicitly.

Depending on the electron AUR package would be ideal but it's also dangerous. Electron releases new versions very often and the API isn't stable yet and breaking changes are being introduced quite often. So in order to stay compatible with the Electron AUR package we'd have to constanty keep an eye on it.
It might be better to download a separate copy of Electron for vmd until Electron 1.0 gets released.

from vmd.

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.