[Pkg-javascript-devel] pkg-js-tools auto_builder

Xavier yadd at debian.org
Tue Aug 6 13:49:19 BST 2019


Le 05/08/2019 à 23:58, Xavier a écrit :
> Hi,
> 
> I started auto_builder, it seems to work. I need some help to fix
> $known_build_commands and $knwonBuildFiles and $knownCommandMap in
> https://salsa.debian.org/js-team/pkg-js-tools/blob/experimental/dh_nodejs/Buildsystem/nodejs.pm
> 
> How it work ?
>  1 - check if a debian/nodejs/build exists and launch it with "sh -e"
>      (same for each component using debian/nodejs/<component>/build
>  2 - check if package.json{scripts}{build} exists:
>      - parse it to find known commands
>      - launch these commands
>      (same for each component)
>  3 - check for known build files (Gruntfile.js,...) and launch the
>      corresponding command
> 
> For now it die only if no command succeeds.

I changed a little and added gulp and babel:

--- 8< ---
# echo, touch and ls are here to help tests
my @known_build_commands =
  (qw(babel grunt gulp rollup tsc webpack echo touch ls));

# Order is important here, example: tsc must be launched before other
my @knwonBuildFiles = (
     [ 'tsconfig.json'     => ['tsc'] ],
     [ 'gulpfile.js'       => ['gulp'] ],
     [ 'Gruntfile.js'      => ['grunt'] ],
     [ 'rollup.config.js'  => ['rollup', '-c'] ],
     [ 'webpack.config.js' => ['webpack'] ],
     [ 'webpackfile.js'    => ['webpack'] ],
 );

my $knownCommandMap = { babel => 'babeljs', };
--- >8 ---




More information about the Pkg-javascript-devel mailing list