Optional
options: AutoBinOptionsReadonly
orderThe higher the number the later the feature will be invoked within each step.
The only real use of this is to make sure the sorting of the packageJson file happens last.
Called once at the start of Autolib, giving a change for each plugin to examine the package.
The returned examination result is merged together with the other plugins result, sharing them the next step. TODO: Re-evaluate if this is even useful or you should just keep your result in the plugin. This could return void
for module based packages, bins are modules too and the adjust path step only acts for the 'es' format
Generates bin entries from files under
srcDir
+autoBinDirectory
It also treats all files named as npm hooks as npm hooks, prefixing them and adding them as hooks for the npm artifactFor example a file called
postinstall.ts
in a package called@org/name
, it will generate an npm script entry as such:"postinstall": "bin/postinstall.js"
. The hook is still treated as abin
so you can invoke it directly. To avoid name collisions, all "hookbins" are prefixed with the normalized packagename like so:org-name-postinstall
For a simpler packageJson, directories.bin could also be used in https://docs.npmjs.com/cli/v9/configuring-npm/package-json#directories