Comments (6)
Maybe vmd-viewer
, vmd-app
, vmd-markdown
or something like that.
from vmd.
vmd-markdown
, vmd-md
, vmd-npm
, visual-markdown
, view-markdown
, varying-meat-dice
, vexing-musk-dispenser
?
from vmd.
I presume the package is not yet in AUR? (I think vmd-markdown
would be a good name.)
from vmd.
@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 thebin/cli.js
entry file
from vmd.
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.
@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)
- Preview from clipboard HOT 4
- Odd highlighting with HCL HOT 1
- Rendering difference between vmd and Github
- <details> tag not working HOT 1
- Emojis does not work with links
- Please upgrade the 'electron' package, it crashes on macOS. HOT 1
- Scrolling bug HOT 2
- Support click to expand
- numbered lists rendering incorrectly
- Error when trying to install HOT 1
- Runtime errors on Mac OSX HOT 4
- Custom script in head tag
- Error installing in Ubuntu 20.04
- pipe to stdout HOT 1
- Cross Site Scripting vulnerability HOT 1
- Clipboard empty after closing vmd
- Problem installing on Mac HOT 4
- Create SECURITY.md
- Support for footnotes
- new line problem
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 vmd.