1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046
|
.TH "PKG\-JS\-TOOLS" "7" "June 2024"
.SH "NAME"
\fBpkg-js-tools\fR \- collection of tools to aid packaging Node modules in Debian\.
.SH WORKING WITH SALSA\.DEBIAN\.ORG REPOSITORY
.P
To use salsa(1) with pkg\-javascript configuration, add something like that in
.br
your \.bashrc:
.RS 2
.nf
alias js\-salsa='salsa \-\-conf\-file +/usr/share/pkg\-js\-tools/pkg\-js\-salsa\.conf'
.fi
.RE
.P
Then you can use salsa simply\. Some examples:
.RS 1
.IP \(bu 2
if you created a local repo and want to create and push it on
.br
.UR https://salsa.debian.org/js-team
.I salsa
.UE ,
launch simply:
.P
js\-salsa push_repo \.
.IP \(bu 2
to configure a repo already pushed:
.P
js\-salsa update_safe node\-foobar
.IP \(bu 2
to clone locally a js\-team package:
.P
js\-salsa co node\-foobar
.RE
.P
See salsa(1) for more\.
.SH DEBHELPER ADDON
.P
\fBpkg\-js\-tools\fR debhelper addon is automatically loaded if a package
.br
build\-depends on \fBdh\-sequence\-nodejs\fR or \fI(old fashion)\fR if \fBdh\fP is called
.br
with \fB\-\-with nodejs\fR in \fBdebian/rules\fP\|\.
.SS Quick use
.P
Examples of basic migration to pkg\-js\-tools:
.br
.UR https://salsa.debian.org/js-team/node-static-module/-/commit/2c6d9fb1
.I Switch test and install to pkg-js-tools
.UE
.SS How it works
.P
pkg\-js\-tools provides hooks for these steps:
.TS
tab(|) expand nowarn box;
l l.
T{
Step
T}|T{
Comment
T}
=
T{
\fBconfigure\fR
T}|T{
populate \fBnode_modules/\fP
T}
_
T{
\fBbuild\fR
T}|T{
build components and main module
T}
_
T{
\fBtest\fR
T}|T{
test components and main module
T}
_
T{
\fBinstall\fR
T}|T{
install components and main module
T}
_
T{
\fBinstalldocs\fR
T}|T{
can auto\-generate docs for each component
T}
_
T{
\fBclean\fR
T}|T{
clean pkg\-js\-tools stuff
T}
.TE
.P
Technically, it adds \fB\-\-buildsystem=nodejs\fP to the corresponding \fBdh_auto_<step>\fP
.br
command\.
.P
\fBImportant note\fR\|\. Here:
.RS 1
.IP \(bu 2
\fBcomponent\fR is the directory name of a submodule \fI(uscan(1) component or
.br
additional components listed in \fBdebian/nodejs/additional_components\fP)\fR\|\.
.br
Example: \fBtypes\-glob\fP
.IP \(bu 2
\fBmodule\fR is the npmjs name\. Example: \fB@types/glob\fP
.RE
.P
See
.UR https://wiki.debian.org/Javascript/GroupSourcesTutorial
.I Group Sources Tutorial
.UE
.br
for more about embedding components\.
.P
Details:
.RS 1
.IP \(bu 2
\fBdh_auto_clean\fR, cleans files automatically installed by \fBpkg\-js\-tools\fR
.br
itself
.IP \(bu 2
\fBdh_auto_configure\fR, automatically populates \fBnode_modules\fP directory:
.RS 1
.IP \(bu 2
links embedded components
.IP \(bu 2
links global modules listed in \fBdebian/nodejs/extlinks\fP
.IP \(bu 2
copies global modules listed in \fBdebian/nodejs/extcopies\fP
.RE
.IP \(bu 2
\fBdh_auto_build\fR, Remember to add a \fBdh_auto_build \-\-buildsystem=nodejs\fP
.br
in \fBoverride_dh_auto_build\fR section if your \fBdebian/rules\fP file has such
.br
section, else this step will be ignored\. Builds:
.RS 1
.IP \(bu 2
components by launching \fBsh \-ex debian/nodejs/<component\-name>/build\fP in
.br
this file exists
.IP \(bu 2
main module by launching \fBsh \-ex debian/nodejs/build\fP if exists
.RE
.IP \(bu 2
\fBdh_auto_test\fR, tests:
.RS 1
.IP \(bu 2
components by launching \fBsh \-ex debian/nodejs/<component\-name>/test\fP if
.br
this file exists
.IP \(bu 2
main module by launching \fBsh \-ex debian/tests/pkg\-js/test\fP if this file
.br
exists\. This test is also used by pkg\-js\-autopkgtest(7) during autopkgtest\.
.br
If you want to have a different test during build, set this test in
.br
\fBdebian/nodejs/test\fP\|\.
.RE
.IP \(bu 2
\fBdh_auto_install\fR: installs modules in the good directories and provides
.br
some debhelper variables to be used in \fBdebian/control\fP\|\. Note that if your
.br
package provides more that one binary package, you have to use some
.br
\fBdebian/<package\-name>\.install\fP files to distribute the files\.
.br
Steps:
.RS 1
.IP \(bu 2
\fBcomponents\fR: determine files to install using the same algorithm than
.br
main module
.br
and install them:
.RS 1
.IP \(bu 2
nowhere if component if \fBdebian/nodejs/submodules\fP exists and component
.br
isn't listed in it \fI(an empty \fBdebian/nodejs/submodules\fP drops all
.br
components)\fR
.IP \(bu 2
nowhere if component is listed in \fBdebian/nodejs/additional_components\fP
.br
with a "!" prefix
.IP \(bu 2
in main nodejs directories if component is listed in
.br
\fBdebian/nodejs/root_modules\fP
.IP \(bu 2
else: in a \fBnode_modules\fP subdirectory of main module
.RE
.IP \(bu 2
\fBmain module\fR, determine files to install \fI(see below)\fR and install them
.br
in the "good" directory:
.RS 1
.IP \(bu 2
if "architecture" is "all": \fB/usr/share/nodejs\fP
.IP \(bu 2
else: \fB/usr/lib/${DEB_HOST_MULTIARCH}/nodejs\fP
.RE
.IP \(bu 2
\fBlinks\fR: builds symlinks listed in \fBdebian/nodejs/links\fP\|\. Same usage
.br
as \fBdebian/links\fP except that source or destination not starting with \fB/\fP
.br
are related to arch path
.br
\fI(\fB/usr/share/nodejs\fP or \fB/usr/lib/<gnu\-arch>/nodejs\fP)\fR
.IP \(bu 2
\fBBuild \fBpkgjs\-lock\.json\fP\fR files: if package "maybe a bundle"
.br
\fI(built with webpack, browserify,\.\.\.)\fR, pkg\-js\-tools builds a
.br
\fBpkgjs\-lock\.json\fP for each module\. This files may help in Debian
.br
transitions
.IP \(bu 2
Variables usable in \fBdebian/control\fP:
.RS 1
.IP \(bu 2
\fB${nodejs:Version}\fP: the version of nodejs used during build
.IP \(bu 2
\fB${nodejs:Provides}\fP: virtual names to be added into "Provides:" field\.
.br
This lists all modules installed in nodejs root directories
.IP \(bu 2
\fB${nodeFoo:Provides}\fP: for a source package that provides several binary
.br
packages, \fBdh\-sequence\-nodejs\fR filters \fB${nodejs:Provides}\fP for each
.br
binary package\. The package name is converted into its camelcase name:
.br
\fBnode\-jest\-worker\fR becomes nodeJestWorker
.IP \(bu 2
\fB${nodejs:BuiltUsing}\fP: when package "maybe a bundle", lists packages
.br
and versions used to build package\. Use it in
.br
\fBXB\-Javascript\-Built\-Using\fR field
.RE
.RE
.IP \(bu 2
\fBdh_installdocs\fR: \fIdh\-sequence\-nodejs\fR provides a tool named
.br
\fBdh_nodejs_autodocs\fR which can be used in a \fBoverride_dh_installdocs\fP
.br
to automatically generate documentation for each component\. See related
.br
manpage
.IP \(bu 2
\fBdh_install\fR: \fIdh\-sequence\-nodejs\fR provides a tool named
.br
\fBdh_nodejs_build_debug_package\fR which can be used to build a separate
.br
debug package with sourcemap files when package size is too big\. See related
.br
manpage
.RE
.SS Automatically detect some additional components
.P
Starting from 0\.12\.0, dh\-sequence\-nodejs automatically reads lerna\.conf and
.br
reads "packages" field to find additional components\.
.P
Starting from 0\.12\.7, it does the same when package\.json has a "workspaces"
.br
field\.
.P
This auto\-detection automatically drops "test" and "tests" directories\. You
.br
can override this behavior using \fBdebian/additional_components\fR\|\.
.P
If a component should not be considered, insert its name preceded by a "!" in
.br
\fBdebian/nodejs/additional_components\fR\|\.
.P
To disable this feature, use \fBdh\-sequence\-nodejs\-no\-lerna\fR\|\.
.SS Algorithm to determine files to install
.P
\fBpkg\-js\-tools\fR tries to reproduce \fBnpm(1)\fR behavior: it reads \fBpackage\.json\fP
.br
and/or \fB\|\.npmignore\fP files to determine files to install except that it drops
.br
licenses, *\|\.md, doc*, example*, test*, makefiles,\.\.\.`\.
.P
This behavior is overridden if:
.RS 1
.IP \(bu 2
\fBdebian/nodejs/install\fP \fI(or \fBdebian/nodejs/<component\-name>/install\fP)\fR
.br
exists\. This file uses the same format than \fBdebian/install\fP\|\.
.IP \(bu 2
\fBdebian/nodejs/files\fP \fI(or \fBdebian/nodejs/<component\-name>/files\fP)\fR exists\.
.br
the content of this file replaces "files" entry of \fBpackage\.json\fP
.RE
.SS pkg\-js\-tools files
.RS 1
.IP \(bu 2
all steps:
.RS 1
.IP \(bu 2
\fBdebian/nodejs/additional_components\fR is used to set some
.br
subdirectories that should be considered as components even if they
.br
are not listed in \fBdebian/watch\fP\|\. Content example: \fBpackages/*\fP\|\.
.br
\fBImportant note\fR: in this example, component name is \fBpackages/foo\fP in
.br
every other files, including paths
.IP \(bu 2
\fBdebian/nodejs/main\fR is used to indicates where is the main module\.
.br
In a package containing only components \fI(bundle package)\fR, you should
.br
choose one of them as main component
.RE
.IP \(bu 2
configure step:
.RS 1
.IP \(bu 2
\fBdebian/build_modules\fR additional modules needed to build, will be
.br
linked in \fBnode_modules\fP directory
.IP \(bu 2
\fBdebian/nodejs/component_links\fR lists needed links between components:
.br
links \fB\|\.\./\.\./component\-src\fP in \fBcomponent\-dst/node_modules/component\-src\-name\fP
.IP \(bu 2
\fBdebian/nodejs/<component\-name>/nolink\fR avoids \fBnode_modules\fP links
.br
creation for this component \fI(configuration step)\fR
.IP \(bu 2
\fBdebian/nodejs/extlinks\fR lists installed node modules that should be
.br
linked into \fBnode_modules\fP directory \fI(modules are searched using nodejs
.br
algorithm)\fR\|\. You can mark them with "test" to avoid errors when build
.br
profile contains \fBnocheck\fP
.IP \(bu 2
\fBdebian/nodejs/extcopies\fR lists installed node modules that should be
.br
copied into \fBnode_modules\fP directory\. You can also mark them with "test"
.IP \(bu 2
\fBdebian/nodejs/<component>/extlinks\fR lists installed node modules that
.br
should be linked in \fB<component>/node_modules\fP directory \fI(\fBtest\fP flag available)\fR
.IP \(bu 2
\fBdebian/nodejs/<component>/extcopies\fR lists installed node modules that
.br
should be copied in \fB<component>/node_modules\fP directory \fI(\fBtest\fP flag available)\fR
.RE
.IP \(bu 2
build step:
.RS 1
.IP \(bu 2
\fBdebian/nodejs/build\fR custom build\. An empty file stops auto build
.IP \(bu 2
\fBdebian/nodejs/<component>/build\fR: same for components
.IP \(bu 2
\fBdebian/nodejs/build_order\fR orders components build (one component
.br
per line)\. Else components are built in alphabetic order except components
.br
declared in \fBdebian/nodejs/component_links\fR: a component that depends
.br
on another is built after
.RE
.IP \(bu 2
test step:
.RS 1
.IP \(bu 2
\fBdebian/tests/test_modules/\fR: additional modules needed for running tests can be
.br
added to this directory as subdirectories, which will be linked in \fBnode_modules\fP
.br
directory during test step only
.IP \(bu 2
\fBdebian/tests/pkg\-js/test\fR: script to launch during test
.br
\fI(launched with \fBset \-e\fP)\fR
.IP \(bu 2
\fBdebian/tests/pkg\-js/files\fR: lists other files than
.br
\fBdebian/tests/test\\_modules/\\*\fP and installed files needed for autopkgtest
.br
\fI(default: \fBtest*\fP)\fR
.IP \(bu 2
\fBdebian/nodejs/test\fR: overwrite \fBdebian/tests/pkg\-js/test\fP during
.br
build if test differs in build and autopkgtest
.IP \(bu 2
\fBdebian/nodejs/<component\-name>/test\fR: same for components
.br
(launched during build only)
.IP \(bu 2
\fBautopkgtest files\fR:
.RS 1
.IP \(bu 2
\fBdebian/tests/autopkgtest\-pkg\-nodejs\.conf\fR: autodep8 configuration file
.br
which can be used to add packages or restrictions during autopkgtest only
.RS 1
.IP \(bu 2
\fBextra_depends=p1, p2, p3\fP permits one to add p1, p2 and p3 packages
.IP \(bu 2
\fBextra\-restrictions=needs\-internet\fP permits one to add additional restrictions
.br
during autopkgtest
.RE
.IP \(bu 2
\fBdebian/tests/pkg\-js/require\-name\fR: contains the name to use in
.br
autopkgtest \fBrequire\fP test instead of package\.json value
.RE
.RE
.IP \(bu 2
install step:
.RS 1
.IP \(bu 2
\fBdebian/nodejs/submodules\fR lists components to install \fI(all if missing)\fR
.IP \(bu 2
\fBdebian/nodejs/root_modules\fR lists components to install in nodejs root
.br
directory \fI(instead of \fBnode_modules\fP subdirectory)\fR\|\. If this file
.br
contains \fB*\fP, all components are installed in root directory
.IP \(bu 2
\fBdebian/nodejs/files\fR overwrites \fBpackage\.json#files\fP field\.
.IP \(bu 2
\fBdebian/nodejs/<component\-name>/files\fR overwrites \fBpackage\.json#files\fP
.br
field\. An empty file avoid any install
.IP \(bu 2
\fBdebian/nodejs/name\fR overwrites \fBpackage\.json#name\fP field\.
.IP \(bu 2
\fBdebian/nodejs/<component\-name>/name\fR overwrites \fBpackage\.json#name\fP
.IP \(bu 2
\fBdebian/nodejs/install\fR overwrites \fBdebian/nodejs/files\fR: same usage as
.br
debian/install except that destination not starting with \fB/\fP are related to
.br
arch path \fI(\fB/usr/share/nodejs\fP or \fB/usr/lib/<gnu\-arch>/nodejs\fP)\fR
.IP \(bu 2
\fBdebian/nodejs/<component\-name>/install\fR same as \fBdebian/nodejs/install\fR
.br
for components
.RE
.IP \(bu 2
link step:
.RS 1
.IP \(bu 2
\fBdebian/nodejs/links\fR: same usage as debian/links except that source or
.br
destination not starting with \fB/\fP are related to arch path
.br
\fI(\fB/usr/share/nodejs\fP or \fB/usr/lib/<gnu\-arch>/nodejs\fP)\fR
.RE
.RE
.P
\fBNB\fR: To install a component in another directory, set its files in \fBdebian/install\fR\|\.
.P
Example:
.RS 1
.IP \(bu 2
debian/control
.RE
.RS 2
.nf
\|\.\.\.
Testsuite: autopkgtest\-pkg\-nodejs
Build\-Depends: dh\-sequence\-nodejs
\|\.\.\.
.fi
.RE
.RS 1
.IP \(bu 2
debian/tests/pkg\-js/test
.RE
.RS 2
.nf
mocha \-R spec
.fi
.RE
.P
See also
.UR ../autopkgtest/README.md
.I pkg-js-autopkgtest README
.UE .
.SS Multiple binary packages
.P
When \fBdebian/control\fP provides more than one binary package, \fBdh_auto_install\fP
.br
populates a \fBdebian/tmp\fP and \fBdh_install\fP install files in each package\. In
.br
this case, you must write a \fBdebian/<package>\.install\fP for each binary
.br
package\. Each line with only one argument is related to \fBdebian/tmp\fP\|\.
.br
Examples:
.RS 1
.IP \(bu 2
debian/node\-arch\-indep\.install: pick files from \fBdebian/tmp\fP
.br
\fBusr/share/nodejs/foo/\fP
.IP \(bu 2
debian/node\-arch\-dep\.install: pick files from \fBdebian/tmp\fP
.br
\fBusr/lib/*/nodejs/foo/\fP
.IP \(bu 2
debian/libjs\.install: pick files from sources
.br
\fBdist/* usr/share/javascript/foo/\fP
.RE
.SS Links
.P
Since path is not fixed for arch\-dependent package, you must write
.br
\fBdebian/nodejs/links\fP:
.RS 2
.nf
# debian/nodejs/links
foo/bin/cli\.js /usr/bin/foo
.fi
.RE
.P
With a arch independent package, pkg\-js\-tools transforms this into:
.RS 2
.nf
/usr/share/nodejs/foo/bin/cli\.js /usr/bin/foo
.fi
.RE
.P
and for a arch dependent package, it uses \fBDEB_GNU_ARCH\fP\|\. Example with amd64:
.RS 2
.nf
/usr/lib/x86_64\-linux\-gnu/foo/bin/cli\.js /usr/bin/foo
.fi
.RE
.P
All fields that does not start with \fB/\fP are prefixed with the good nodejs path
.SS Component docs
.P
Starting from version 0\.13\.0, \fBpkg\-js\-tools\fR provides \fBdh_nodejs_autodocs\fR\|\.
.br
This tool automatically install README\.md, CONTRIBUTING\.md,\.\.\. for each
.br
root component in its \fB/usr/share/doc/node\-<name>\fP directory\. And if no
.br
\fBdebian/*docs\fP is found, it does the same for the main component\. To use it:
.RS 2
.nf
override_dh_installdocs:
dh_installdocs
dh_nodejs_autodocs
.fi
.RE
.SS \|\.eslint* files
.P
pkg\-js\-tools auto installer always removes \fB\|\.eslint*\fP files unless it
.br
is explicitly specified in \fBdebian/nodejs/**/files\fP or
.br
\fBdebian/nodejs/**/install\fP\|\.
.SS Having different test between build and autopkgtest
.P
When \fBdebian/nodejs/test\fP exists, this file is used during build test instead
.br
of \fBdebian/tests/pkg\-js/test\fP\|\. This permits one to have a different test\. You can
.br
also overwrite \fBdh_auto_test\fP step in \fBdebian/rules\fP:
.RS 2
.nf
override_dh_auto_test:
# No test during build (test needs Internet)
.fi
.RE
.SS Autopkgtest additional test packages or test restrictions
.P
autodep8 allows one to add additional packages during autopkgtest (and/or
.br
additional restrictions) by using a debian/tests/autopkgtest\-pkg\-nodejs\.conf
.br
file:
.RS 2
.nf
extra_depends=mocha, npm
extra\-restrictions=needs\-internet
.fi
.RE
.SH LINTIAN PROFILES
.P
pkg\-js\-tools provides a lintian profile:
.RS 1
.IP \(bu 2
pkg\-js\-extra: launches additional checks \fI(repo consistency see
.br
debcheck\-node\-repo below)\fR
.RE
.P
To use them:
.RS 2
.nf
lintian \-\-profile pkg\-js\-extra \.\./node\-foo_1\.2\.3\-1\.changes
.fi
.RE
.SH OTHER TOOLS
.P
See related manpages\.
.RS 1
.IP \(bu 2
\fBadd\-node\-component\fR: automatically modifies gbp\.conf and debian/watch to add
.br
a node component\. See
.br
.UR https://wiki.debian.org/Javascript/GroupSourcesTutorial
.I JS Group Sources Tutorial
.UE .
.br
It can also list components or modules (real names)
.IP \(bu 2
\fBgetFromNpmCache\fR: export npm cache content to standard output
.IP \(bu 2
\fBgithub\-debian\-upstream\fR: launches it in source repo to create a
.br
debian/upstream/metadata \fI(works only if upstream repo is on GitHub)\fR
.IP \(bu 2
\fBnodepath\fR: shows the path of a node module (npm name)\. You can use \fB\-p\fP to
.br
show also the Debian package\. Option \fB\-o\fP shows only Debian package name\.
.IP \(bu 2
\fBdebcheck\-node\-repo\fR: checks repo consistency: compares vcs repo registered
.br
in npm registry with the source repo declared in debian/watch"
.IP \(bu 2
\fBdh_nodejs_autodocs\fR: automatically select and install documentation files
.br
toinstall for each component
.IP \(bu 2
\fBdh_nodejs_build_debug_package\fR: move sourcemap files from binary
.br
packages to a separated debug package
.IP \(bu 2
\fBmjs2cjs\fR: build commonjs file using rollup
.IP \(bu 2
\fBpkgjs\-audit\fR: creates a temporary \fBpackage\-lock\.json\fP file using Debian
.br
package values used by the module to analyze, and launch a \fBnpm audit\fP\|\. If
.br
module is a bundle \fI(and then has a \fBpkgjs\-lock\.json\fP)\fR, pkgjs\-audit uses
.br
\fBpkgjs\-lock\.json\fP, else it generates its package\-lock\.json using available
.br
values
.IP \(bu 2
\fBpkgjs\-depends\fR: search recursively dependencies of the given module name
.br
(if not given, use current package\.json) and displays related Debian packages
.br
and missing dependencies
.IP \(bu 2
\fBpkgjs\-install\fR: same as \fBnpm install\fP but uses Debian JS modules when
.br
available
.IP \(bu 2
\fBpkgjs\-install\-minimal\fR: same as pkgjs\-install but uses only available
.br
Debian modules\. It is included in dh\-nodejs so can be used during build
.IP \(bu 2
\fBpkgjs\-ls\fR: same as \fBnpm ls\fP but it search also in global nodejs paths
.IP \(bu 2
\fBpkgjs\-run\fR: same as \fBnpm run\fP
.IP \(bu 2
\fBpkgjs\-lerna run\fR: same as \fBlerna run\fP \fI(only run command is implemented)\fR
.IP \(bu 2
\fBpkgjs\-utils\fR, \fBpkgjs\-ln\fR, \fBpkgjs\-main\fR, \fBpkgjs\-pjson\fR: various
.br
utilities\. See \fBpkgjs\-utils(1)\fP manpage
.IP \(bu 2
\fBpkgjs\fR: try to reproduce \fByarnpkg(1)\fP commands with \fBpkgjs\-*\fP scripts\.
.RE
.SH SEE ALSO
.P
debhelper(7), pkg\-js\-autopkgtest(7), uscan(1), add\-node\-component(1),
.br
github\-debian\-upstream(1), nodepath(1), mjs2cjs(1), pkgjs\-ls(1),
.br
pkgjs\-depends(1), pkgjs\-audit(1), pkgjs\-utils(1), pkgjs\-install(1)
.SH FEATURES HISTORY
.TS
tab(|) expand nowarn box;
l l.
T{
TOOL
T}|T{
Minimal version
T}
=
T{
add\-node\-component
T}|T{
0\.8\.14
T}
_
T{
add\-node\-component \-\-cmp\-tree
T}|T{
0\.9\.22
T}
_
T{
debcheck\-node\-repo
T}|T{
0\.8\.14
T}
_
T{
dh_nodejs_autodocs
T}|T{
0\.13\.0
T}
_
T{
dh_nodejs_autodocs auto_dispatch
T}|T{
0\.14\.5
T}
_
T{
dh_nodejs_build_debug_package
T}|T{
0\.15\.5
T}
_
T{
dh_nodejs_substvars
T}|T{
0\.14\.5
T}
_
T{
dh\-make\-node
T}|T{
0\.9\.18
T}
_
T{
getFromNpmCache
T}|T{
0\.14\.32
T}
_
T{
mjs2cjs
T}|T{
0\.12\.3
T}
_
T{
mjs2cjs \-a
T}|T{
0\.14\.14
T}
_
T{
pkgjs
T}|T{
0\.15\.21
T}
_
T{
pkgjs\-audit
T}|T{
0\.11\.2
T}
_
T{
pkgjs\-depends
T}|T{
0\.9\.54
T}
_
T{
pkgjs\-depends \-\-graph
T}|T{
0\.14\.34
T}
_
T{
pkgjs\-install
T}|T{
0\.14\.20
T}
_
T{
pkgjs\-install\-minimal
T}|T{
0\.14\.27
T}
_
T{
pkgjs\-ln
T}|T{
0\.9\.76
T}
_
T{
pkgjs\-lerna
T}|T{
0\.15\.13
T}
_
T{
pkgjs\-ls
T}|T{
0\.9\.30
T}
_
T{
pkgjs\-main
T}|T{
0\.9\.76
T}
_
T{
pkgjs\-pjson
T}|T{
0\.9\.76
T}
_
T{
pkgjs\-run
T}|T{
0\.14\.22
T}
_
T{
pkgjs\-utils
T}|T{
0\.9\.75
T}
.TE
.TS
tab(|) expand nowarn box;
l l.
T{
FEATURE
T}|T{
Minimal version
T}
=
T{
additional_components
T}|T{
0\.9\.11
T}
_
T{
auto build (grunt)
T}|T{
0\.9\.3
T}
_
T{
autopkgtest skip
T}|T{
0\.9\.30
T}
_
T{
auto\-install (arch\-dep)
T}|T{
0\.9\.27
T}
_
T{
build order
T}|T{
0\.9\.10
T}
_
T{
dh\-sequence\-nodejs
T}|T{
0\.9\.41
T}
_
T{
follow lerna\.json#useWorkspaces
T}|T{
0\.14\.8
T}
_
T{
\|\.npmignore support
T}|T{
0\.9\.53
T}
_
T{
support lerna\.conf
T}|T{
0\.12\.0
T}
_
T{
support workspaces
T}|T{
0\.12\.7
T}
_
T{
debian/nodejs/main
T}|T{
0\.9\.11
T}
_
T{
debian/tests/test_modules
T}|T{
0\.9\.33
T}
_
T{
debian/build_modules
T}|T{
0\.9\.33
T}
_
T{
${nodejs:BuiltUsing}
T}|T{
0\.11\.8
T}
_
T{
${nodejs:Provides}
T}|T{
0\.9\.10
T}
_
T{
${nodejs:Version}
T}|T{
0\.9\.38
T}
_
T{
${nodeFoo:Provides}
T}|T{
0\.14\.5
T}
_
T{
ordered_components_list
T}|T{
0\.15\.13
T}
_
T{
packages_list
T}|T{
0\.15\.13
T}
.TE
.SH COPYRIGHT AND LICENSE
.P
Copyright Yadd <yadd@debian.org>
.P
This library is free software; you can redistribute it and/or modify
.br
it under the terms of the GNU General Public License as published by
.br
the Free Software Foundation; either version 2, or (at your option)
.br
any later version\.
.P
This program is distributed in the hope that it will be useful,
.br
but WITHOUT ANY WARRANTY; without even the implied warranty of
.br
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\. See the
.br
GNU General Public License for more details\.
.P
On Debian systems, the complete text of version 2 of the GNU General
.br
Public License can be found in `/usr/share/common\-licenses/GPL\-2'\.
.br
If not, see
.UR http://www.gnu.org/licenses/
.I GNU licenses
.UE ;
|