Skip to content

Plugin Guide: Notes for --link option #1416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion www/docs/en/12.x-2025.01/guide/hybrid/plugins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ cordova plugin add ../path/to/my/plugin/relative/to/project --link
```

This creates a symbolic link instead of copying the plugin files, which enables you
to work on your plugin and then simply rebuild the app to use your changes.
to work on your plugin and then simply rebuild the app to use your changes. You have to add the plugin after you added the platform, otherwise the link will not work. The link will also be lost, if you re-add a platform. If you do this you have to re-add the plugin.
Copy link
Member

@erisu erisu Apr 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
to work on your plugin and then simply rebuild the app to use your changes. You have to add the plugin after you added the platform, otherwise the link will not work. The link will also be lost, if you re-add a platform. If you do this you have to re-add the plugin.
to work on your plugin and then simply rebuild the app to use your changes. The plugin should be added after the platform, or the link will not work. The link will also be lost if you re-add the platform or restore the project. In that case, you'll need to re-add the plugin to restore the link.

How does the above sound?

Copy link
Contributor Author

@GitToTheHub GitToTheHub Apr 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add a ; in the sentence, can‘t this be a ,? How can you restore a project, what does this mean?

Copy link
Member

@erisu erisu Apr 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used a ";" because they both could be stand-alone sentences.
Update: Decided to replaced ; otherwise with , or.

Example of Restoring a Project

  1. git clone project....
  2. npm install
  3. cordova prepare

The prepare step will restore the project based on the platforms and plugins that were previously added and stored in package.json and config.xml.

Same applies if your working with an existing project and just running.

  1. rm -rf platforms plugins
  2. cordova prepare

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concept of restoring is documented here: Apache Cordova - Version Management


## Validating a Plugin using Plugman

Expand Down
Loading