Bug#845043: automatically handle Gruntfile.js/.coffee

2018-05-10 Thread Jérémy Lal
2018-05-10 11:10 GMT+02:00 Niels Thykier :

> On Sat, 30 Dec 2017 12:58:14 +0530 Pirate Praveen 
> wrote:
> > Control: affects -1 nodejs-dev
> >
> > [copying nodejs/npm2deb maintainers]
> > bcc: pkg-javascript-devel, follow #845043
> >
> > On Thu, 28 Dec 2017 09:11:00 + Niels Thykier 
> > wrote:> Sure; the idea more about you developing the prototype in a
> separate
> > > package and less about the concrete name of the package.  We can also
> do
> > > it inside debhelper, but then you get changes at the pace of debhelper
> > > releases plus the stability woes/guarantees of debhelper (e.g. at some
> > > point it will take compat bumps to fix things).
> >
> > I just found out nodejs-dev has some basic debhelper plugin
> > https://anonscm.debian.org/cgit/collab-maint/nodejs.git/
> tree/debian/nodejs.pm
> > may be we can extend that.
> >
>
> Ok, to me nodejs-dev sounds like a good start location for the build
> systems (on the assumption it already has debhelper related tooling).
> Note that packages can provide build systems without providing all the
> dependencies required for using them.  As an example, debhelper does
> that with meson+ninja or cmake+ninja where packages have to Build-Depend
> on meson or cmake and ninja themselves (on top of the build-dependency
> on debhelper).
>
> > > If those are "good enough" for you, then I am fine with going that
> > > direction.
> > >
> > > >> FTR, I know next to nothing about grunt/nodejs builds, so I am a
> poor
> > > >> choice for driving such a prototype.  However, I am happy to assist
> with
> > > >> the debhelper integration bit.
> > > >
> > > > I think it does not need any nodejs knowledge. If you find a
> > > > Gruntfile.js or Gruntfile.coffee, just call "grunt build".
> > > >
> > > > Same for gulp, if you find a Gulpfile.js, just call "gulp build".
> > > >
> > > > Also for cake, if you find Cakefile, just call "cake.coffeescript
> build".
> > > >
> > >
> > [... how to call the tools ...]
> >
> >
>
> I have attached a sample buildsystem for grunt that should run "grunt
> build" and "grunt clean".  While testing, you will need to explicitly
> active the build system with "-Sgrunt" for now.  This is because
> debhelper has a whitelist of buildsystems it will autoselect, but I am
> happy to add the javascript related build systems once they are available.
>
> The build system should be installed in perl's default search path as
> "Debian/Debhelper/Buildsystem/grunt.pm" (e.g.
> /usr/share/perl5/Debian/Debhelper/Buildsystem/grunt.pm).  Furthermore,
> the sample should be trivial to use as a basis for the gulp and cake tools.
>


For your information:
nodejs 10 (in experimental) is built with a shared lib + executable + dev
files,
so i moved the nodejs includes files to libnode-dev, and kept nodejs-dev
only
for providing the transition away from the unnecessary dh helper (since
building
against the shared lib is now enough).
nodejs-dev could be "revived" with those features you're talking about, or
maybe
it would be less confusing to make a new package to hold those features,
like
"nodejs-dev-grunt".

Jérémy


Bug#845043: automatically handle Gruntfile.js/.coffee

2018-05-10 Thread Niels Thykier
On Sat, 30 Dec 2017 12:58:14 +0530 Pirate Praveen 
wrote:
> Control: affects -1 nodejs-dev
> 
> [copying nodejs/npm2deb maintainers]
> bcc: pkg-javascript-devel, follow #845043
> 
> On Thu, 28 Dec 2017 09:11:00 + Niels Thykier 
> wrote:> Sure; the idea more about you developing the prototype in a separate
> > package and less about the concrete name of the package.  We can also do
> > it inside debhelper, but then you get changes at the pace of debhelper
> > releases plus the stability woes/guarantees of debhelper (e.g. at some
> > point it will take compat bumps to fix things).
> 
> I just found out nodejs-dev has some basic debhelper plugin
> https://anonscm.debian.org/cgit/collab-maint/nodejs.git/tree/debian/nodejs.pm
> may be we can extend that.
> 

Ok, to me nodejs-dev sounds like a good start location for the build
systems (on the assumption it already has debhelper related tooling).
Note that packages can provide build systems without providing all the
dependencies required for using them.  As an example, debhelper does
that with meson+ninja or cmake+ninja where packages have to Build-Depend
on meson or cmake and ninja themselves (on top of the build-dependency
on debhelper).

> > If those are "good enough" for you, then I am fine with going that
> > direction.
> > 
> > >> FTR, I know next to nothing about grunt/nodejs builds, so I am a poor
> > >> choice for driving such a prototype.  However, I am happy to assist with
> > >> the debhelper integration bit.
> > > 
> > > I think it does not need any nodejs knowledge. If you find a
> > > Gruntfile.js or Gruntfile.coffee, just call "grunt build".
> > > 
> > > Same for gulp, if you find a Gulpfile.js, just call "gulp build".
> > > 
> > > Also for cake, if you find Cakefile, just call "cake.coffeescript build".
> > > 
> > 
> [... how to call the tools ...]
> 
> 

I have attached a sample buildsystem for grunt that should run "grunt
build" and "grunt clean".  While testing, you will need to explicitly
active the build system with "-Sgrunt" for now.  This is because
debhelper has a whitelist of buildsystems it will autoselect, but I am
happy to add the javascript related build systems once they are available.

The build system should be installed in perl's default search path as
"Debian/Debhelper/Buildsystem/grunt.pm" (e.g.
/usr/share/perl5/Debian/Debhelper/Buildsystem/grunt.pm).  Furthermore,
the sample should be trivial to use as a basis for the gulp and cake tools.

Thanks,
~Niels


grunt.pm
Description: Perl program


Bug#845043: automatically handle Gruntfile.js/.coffee

2017-12-28 Thread Niels Thykier
Pirate Praveen:
> Control: tags -1 -moreinfo
> 
> On Sat, 18 Feb 2017 09:54:00 + Niels Thykier  wrote:
> 
>> I think the best solution here is to start with a dh-grunt prototype,
>> which can evolve in its own pace (notably a lot faster than debhelper
>> itself).  Once it has matured, we can look at merging it into debhelper
>> itself depending on its (build-)dependency requirements.
> 
> May be we can have dh-nodejs.
> 

Sure; the idea more about you developing the prototype in a separate
package and less about the concrete name of the package.  We can also do
it inside debhelper, but then you get changes at the pace of debhelper
releases plus the stability woes/guarantees of debhelper (e.g. at some
point it will take compat bumps to fix things).

If those are "good enough" for you, then I am fine with going that
direction.

>> FTR, I know next to nothing about grunt/nodejs builds, so I am a poor
>> choice for driving such a prototype.  However, I am happy to assist with
>> the debhelper integration bit.
> 
> I think it does not need any nodejs knowledge. If you find a
> Gruntfile.js or Gruntfile.coffee, just call "grunt build".
> 
> Same for gulp, if you find a Gulpfile.js, just call "gulp build".
> 
> Also for cake, if you find Cakefile, just call "cake.coffeescript build".
> 

I assume that the above instructions cover "dh_auto_build" and
"auto-detection".  What do I do for:

 * dh_auto_configure?  (Nothing?)

 * dh_auto_test? ( test |  check?)

 * dh_auto_install?  ( install DESTDIR=.../debian/tmp/ ?)

 * dh_auto_clean?  ( clean?)

Should I pass any flags for some tools to (e.g.) disable internet usage,
tweak which tests are being run, choose where stuff is installed,
whether files are minimized, etc.?

Thanks,
~Niels



Bug#845043: automatically handle Gruntfile.js/.coffee

2017-12-27 Thread Pirate Praveen
Control: tags -1 -moreinfo

On Sat, 18 Feb 2017 09:54:00 + Niels Thykier  wrote:

> I think the best solution here is to start with a dh-grunt prototype,
> which can evolve in its own pace (notably a lot faster than debhelper
> itself).  Once it has matured, we can look at merging it into debhelper
> itself depending on its (build-)dependency requirements.

May be we can have dh-nodejs.

> FTR, I know next to nothing about grunt/nodejs builds, so I am a poor
> choice for driving such a prototype.  However, I am happy to assist with
> the debhelper integration bit.

I think it does not need any nodejs knowledge. If you find a
Gruntfile.js or Gruntfile.coffee, just call "grunt build".

Same for gulp, if you find a Gulpfile.js, just call "gulp build".

Also for cake, if you find Cakefile, just call "cake.coffeescript build".



signature.asc
Description: OpenPGP digital signature


Bug#845043: automatically handle Gruntfile.js/.coffee

2017-02-18 Thread Niels Thykier
Control: tags -1 moreinfo

On Sun, 20 Nov 2016 00:14:41 +0530 Pirate Praveen 
wrote:
> package: debhelper
> version: 10.2.2
> severity: wishlist
> 
> grunt is a javascript task runner and was packaged recently. It would be
> amazing if debhelper can handle projects that use grunt automatically
> like other build systems. grunt is widely used in nodejs/javascript
> projects.
> 

Hi,

I think the best solution here is to start with a dh-grunt prototype,
which can evolve in its own pace (notably a lot faster than debhelper
itself).  Once it has matured, we can look at merging it into debhelper
itself depending on its (build-)dependency requirements.

FTR, I know next to nothing about grunt/nodejs builds, so I am a poor
choice for driving such a prototype.  However, I am happy to assist with
the debhelper integration bit.

Thanks,
~Niels



Bug#845043: automatically handle Gruntfile.js/.coffee

2016-11-19 Thread Pirate Praveen
package: debhelper
version: 10.2.2
severity: wishlist

grunt is a javascript task runner and was packaged recently. It would be
amazing if debhelper can handle projects that use grunt automatically
like other build systems. grunt is widely used in nodejs/javascript
projects.



signature.asc
Description: OpenPGP digital signature