Integrating npm front-end with Kallithea
Dominik Ruf
dominikruf at gmail.com
Tue Nov 14 18:01:43 UTC 2017
Mads Kiilerich <mads at kiilerich.com> schrieb am Di., 14. Nov. 2017 um
02:17 Uhr:
> On 11/13/2017 08:36 PM, Dominik Ruf wrote:
>
> I don't like the npm dependency for pip installations either.
> I think it'd be better to include the bootstrap source files and minified
> files in the manifest.
> That way, one can use any less (and minification) tool (even offline) and
> we comply to the GPL.
> This doesn't mean these source file should be in our mercurial repository.
> (I strongly believe they should not.)
> We (the developers) should add scripts/tools to the repository that make
> it easy for us
> to add and update 3rd-party less, css and js libraries.
> In my view npm is the easiest tool for this.
>
>
> Dominik, that sounds great. Especially since you have been doing most of
> the recent front-end work and is the biggest stakeholder. I didn't want to
> put more load on you and try to make you solve more problems.
>
>
> So, we envision a plan that is something like this:
>
> We ship compiled front-end code ... and take care to make sure that we
> make all corresponding source available so we comply with GPL.
>
Yes
>
> We pin/lock our preferred dependency versions, but do not "vendor" them in
> our source repository. Other dependency versions than the preferred ones
> might work too. The preferred versions of our dependencies will be used and
> shipped with our releases.
>
Yes
>
> Making a release (and uploading to pypi will require npm). Installing
> Kallithea from pypi or other official releases will not require npm or
> sources.
>
Yes
>
> The release build process is thus the following steps:
> 1. download source packages for all dependencies using npm
> 2. running offline, only using these source packages, compile the
> front-end code
> 3. ship the compiled front-end code in the python package, and also ship
> all the dependency sources - details TBD
>
Yes
>
> Development will require npm and compiling from source, where the source
> probably either is from a previous release or direct npm downloads.
>
Yes
>
> The biggest open question I see is about how we distribute the
> corresponding source. I see 3 safe options:
> 1. Include all corresponding source in the pypi package together with the
> compiled front-end code (which do that people don't really need the source
> unless they redistribute, but make compliance very explicit ...). How much
> bigger twill that make the package?
>
A quick look at the less folder of bootstrap says it is 206kB. There are a
few more files that should/need to be included, but it should not be much
more.
> 2. Publish all the corresponding source in a separate pypi package so it
> is obvious that when we are using pypi to "redistribute" our package, pypi
> also offer the corresponding source.
> 3. Publish the source on kallithea-scm.org, which is our main
> distribution point and is the place we generally provide source from.
>
At the beginning I thought we should go with option 3. But it is not that
much data and I think
it is easier for us. So I prefer option 1. now.
>
> It might be annoying that we require npm for the development, download,
> and building releases. If someone wants to, they can perhaps change the
> details of this and provide Python based tooling without changing this
> overall concept.
>
>
> Do you agree on this plan?
>
Yes
> How can we make it happen?
>
I'll update the pypi manifest file in future PRs.
>
>
> /Mads
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20171114/358c2e17/attachment-0001.html>
More information about the kallithea-general
mailing list