π¦NPM packages
Last updated
Was this helpful?
https://github.com/petalframework/petal_pro/commits/recipes/npm
This recipe creates a package.json file and allows you to import NPM packages into your app.js file.

Note: this has been rebased on the latest main branch and might not work properly on v1.3.0 and below. However, you should be able to work out how to apply it based on the diffs.
Follow the cherry-pick instructions with the branch recipes/npm.
Run asdf install to install the Node version mentioned in .tool-versions.
Run npm install -g npm to install NPM.
Run mix setup or cd assets && npm install.
Now when you run the server, it should all be working.
Here's how to install tippy.js:
Then, in your app.js:
Last updated
Was this helpful?
Was this helpful?
cd assets && npm i tippy.jsimport tippy from 'tippy.js';