@gerbergpt/medusa-wishlist
v1.0.2
Published
Wishlist plugin for Medusa v2 application
Maintainers
Readme
Compatibility
This starter is compatible with versions >= 2.4.0 of @medusajs/medusa.
Getting Started
Visit the Quickstart Guide to set up a server.
Visit the Plugins documentation to learn more about plugins and how to create them.
Visit the Docs to learn more about our system requirements.
Development
- Install Yarn
npm i -g yarn- Publish Alipay payment locally via yalc:
cd medusa-plugin-wishlist
yarn install
npx medusa plugin:publish- Navigate to your Medusa backend application and install the plugin:
npx medusa plugin:add @gerbergpt/medusa-plugin-wishlistAfter installation, you should see an entry pointing to the local yalc package:
"dependencies": {
...,
"@gerbergpt/medusa-plugin-wishlist": "file:.yalc/@gerbergpt/medusa-plugin-wishlist",
...
}- Configure your Medusa application (backend)
module.exports = defineConfig({
// ...
plugins: [
{
resolve: "@gerbergpt/medusa-plugin-wishlist",
options: {},
},
],
})- Now you can start developing this plugin
npx medusa plugin:develop- Generating migrations for wishlist modules
During your development, you may need to generate migrations for modules in your plugin. To do that, first, add the following environment variables in your plugin project:
DB_USERNAME=postgres
DB_PASSWORD=123...
DB_HOST=localhost
DB_PORT=5432
DB_NAME=db_name- Then, run the following command in your plugin project to generate migrations for the modules in your plugin:
npx medusa plugin:db:generateThis command generates migrations for all modules in the plugin.
Finally, run these migrations on the Medusa application that the plugin is installed in using the db:migrate command:
npx medusa db:migrate- If you need to move the local npm package bridged by
yalc, just run:
npx yalc remove @gerbergpt/medusa-plugin-wishlist