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

How to handle JavaScript npm + gulp web GUI packaging?



Hi,

I would like to package a web app which contains Javascript stuff, which
are using npm + gulp (to disclose everything: I am packaging fuel-web).

Currently, the way to build the JavaScript is to do:

cd nailgun
npm install
./node_modules/.bin/gulp build --static-dir=compressed_static
mkdir -p $(CURDIR)/debian/fuel-web-static/usr/share/nailgun
cp -r compressed_static \
	$(CURDIR)/debian/fuel-web-static/usr/share/nailgun/static
cd ..

Of course, doing the above in Debian isn't possible, because:
1/ I want to use system nodejs-* and libjs-* packages, not bundle any of
these stuff inside my app.
2/ npm does network access to fetch dependencies, which isn't possible
at build time

So, for the moment, I have written a fuel-web-bundle-js source package
containing the non-free pre-built blobs (which typically could be
uploaded to non-free), and the fuel-web source package that generates
the fuel-web-static that depends on it.

I'd like to fix this in a better way so that Fuel can be fully uploaded
to Debian main. How to make this all in a Debian policy compliant way?

Cheers,

Thomas Goirand (zigo)

P.S: I'm not afraid of packaging all individual libjs-* and nodejs-*
(build-) dependencies, even if there's a big number of them.


Reply to: