forked from medusajs/medusa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): Add plugin:publish and plugin:add commands support (medusa…
…js#10938) RESOLVES FRMW-2864 RESOLVES FRMW-2868 **What** Add support for the following cli commands: - `plugin:publish` - `plugin:add`
- Loading branch information
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@medusajs/medusa": patch | ||
"@medusajs/cli": patch | ||
--- | ||
|
||
feat(cli): Add plugin:publish and plugin:add commands support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as yalc from "yalc" | ||
|
||
/** | ||
* Add the specified plugins to the project from the local packages registry | ||
*/ | ||
export default async function localAddPlugin({ | ||
directory, | ||
plugin_names, | ||
}: { | ||
directory: string | ||
plugin_names: string[] | ||
}) { | ||
await yalc.addPackages(plugin_names, { | ||
workingDir: directory, | ||
replace: true, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as yalc from "yalc" | ||
|
||
/** | ||
* Publish the plugin to the local packages registry | ||
*/ | ||
export default async function localPublishPlugin({ | ||
directory, | ||
}: { | ||
directory: string | ||
}) { | ||
await yalc.publishPackage({ | ||
push: true, | ||
workingDir: directory, | ||
changed: true, | ||
replace: true, | ||
}) | ||
} |