Currently we use Rollup to build and bundle phunt-cli.
The build produces the following structure in dist directory:
dist
node_modules/
better-sqlite3/
bundle.js
I would like to rename bundle.js to phunt-cli.js to avoid the need for renaming during release packaging in GitHub Actions.
Additionally, I am considering including the better-sqlite3 package in the generated bundle. Currently, it is excluded because Rollup cannot bundle native bindings used by this dependency. The plan is to copy the native bindings to a directory within dist and bundle everything else as usual. I believe that this can be done using the following rollup plugin https://github.com/danielgindi/rollup-plugin-natives or at least give us some pointers from where to start.
TODO
[x] rename the generated bundle.js to phunt-cli.js (to be done in rollup config)
[x] update phunt-cli package.json to reflect the new entrypoint file name
[ ] try to integrate external better-sqlite3 dependency into the generated bundle and just keep native bindings outside of it
Description
Currently we use Rollup to build and bundle
phunt-cli
.The build produces the following structure in dist directory:
I would like to rename bundle.js to phunt-cli.js to avoid the need for renaming during release packaging in GitHub Actions.
Additionally, I am considering including the better-sqlite3 package in the generated bundle. Currently, it is excluded because Rollup cannot bundle native bindings used by this dependency. The plan is to copy the native bindings to a directory within dist and bundle everything else as usual. I believe that this can be done using the following rollup plugin https://github.com/danielgindi/rollup-plugin-natives or at least give us some pointers from where to start.
TODO