[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging Go with nodejs app





Le mer. 3 sept. 2025 à 23:57, Ahmad Khalifa <ahmad@khalifa.ws> a écrit :
Hi,

I have a golang package that embeds a full reactjs/material app in the
go executable that is built. When trying npm2js, pkgjs* and `dh
--buildsystem=nodejs`, I noticed that none of them want to interact with
a subdirectory.

I tried a few things, but seems dh nodejs buildsystem will only answer
check_auto_buildable() only if package.json is at the root.

The basic structure of 'ntfy' [1] is:
- ntfy/
   - go.mod
   - ... golang stuff ...
   - web/
     - public/
     - src/
     - package.json
     - vite.config.js

Ignoring vitejs for a second.

My questions are:
a. Are there any examples of projects that do something similar that I
can have a look at? To see how control/rules/etc.. look.

Not that I know of with nodejs, but you can try "receptor" where I do:
dh_auto_configure --buildsystem=pybuild --sourcedirectory=receptorctl -- --name=receptorctl

Hint: https://sources.debian.org/ is very useful to find actual examples.
 
b. The dependencies of this app include "react-remark", which is pretty
deep (pkgjs-depends shows ~50 lines) - are there any plans to package
that or suggestions on whether it's doable?

To check if someone's on it:
https://wnpp.debian.net/?type%5B%5D=ITA&type%5B%5D=ITP&type%5B%5D=O&type%5B%5D=RFA&type%5B%5D=RFH&type%5B%5D=RFP&project=react&description=&owner%5B%5D=yes&owner%5B%5D=no&col%5B%5D=dust&col%5B%5D=type&col%5B%5D=description&col%5B%5D=installs&col%5B%5D=owner&sort=installs%2Fdesc

This isn't going to be easy, though some parts might be packageable in a M.U.T. bundle.
remark-parse, remark-rehype, unified maybe.


1. https://salsa.debian.org/go-team/packages/ntfy

PS, I'm ignoring vitejs for now as I saw some emails about it on the
list, so I'll wait a little to see what happens. Also, planning on
trying webpack, if it can do the job.

Try esbuild, it's a very friendly bundler.

Jérémy


Reply to: