Plugin Pro CLI
Commands
npx plgn login
Authenticate with Plugin Pro. Opens a browser window to complete GitHub authentication and links your CLI session to your Plugin Pro account.
npx plgn logout
Sign out from Plugin Pro. This will remove your authentication credentials from the CLI.
npx plgn compose
Compose a config plugin based on your manual native changes. Outputs a file to the plugins/
directory.
How it works
Modifying files
File modifications are handled differently based on the file type:
-
Structured: The file has a specific format that can be easily modified. For example, JSON, XML, and plist files. Moifications can be mapped to specific plugins, such as withInfo
or withEntitlements
.
-
Unstructured: The file does not have a specific format, and can contain any code. For example, Swift, Kotlin, and Objective-C files. Modifications are handled by merging the changes with the existing file via the withModifyFile
plugin.
Adding files
When you add a new file, it will generate the appropriate plugin action. The file will also be copied into the plugins/
directory, using the same relative path. This means that you can manage your new files outside of your native directories. For example, let's say you add a new Swift file to your ios/
directory.
The following will be added to your plugin:
[withSourceFile, { filePath: "ios/NewFile.swift" }];
And the file will be copied into the plugins/
directory:
plugins/
ios/
NewFile.swift
Removing files
When you remove a file, the plugin action will delete the file and remove any references to it.