Shopify CLI Plugin Integration#272
Conversation
bec16a1 to
3d62192
Compare
|
Nice! Understood. I'm good with this approach. Couple points:
|
|
Yup, we can do that, just wanted to get something working here. |
f17d1a6 to
a6d06fb
Compare
|
@t-kelly I studied more Oclif, and I was able to make our plugin work within the current project setup. We have an ESM plugin that does not need a separate workspace and does not need any build steps/TypeScript 🎉 |
291232c to
36a5ee3
Compare
Refactor plugin using vanilla JS Undo workspaces Clean up Linter errors fix Clean up Update oclif config Update lock file Update run file Clean up Update packge.json file Update bin files Update commands
Update readme file Update readme file
36a5ee3 to
5c9c513
Compare
| const { args } = await this.parse(Install) | ||
|
|
||
| const command = 'npm' | ||
| // TODO: update archie so it can install a single component |
There was a problem hiding this comment.
Archie already has that feature, but it is based on the theme's package.json archie config. We could port this feature to be command-line compatible.
| }, | ||
| "engines": { | ||
| "node": ">=18.14.2" | ||
| "node": ">=18.12.0" |
There was a problem hiding this comment.
I have no objections to that change; I'm just wondering why. Is it to be aligned to the shopify CLI?
There was a problem hiding this comment.
Yup it's the same version the Shopify CLI has
| * [`shopify theme component dev [COMPONENT]`](#shopify-theme-component-dev-component) | ||
| * [`shopify theme component generate COMPONENT`](#shopify-theme-component-generate-component) | ||
| * [`shopify theme component install`](#shopify-theme-component-install) | ||
|
|
This PR adds the necessary files to create a Shopify CLI plugin for archie.
"type": "module"and it's a CJS plugin. @oclif/core v3 does support ESM plugins, but the Shopify CLI uses @oclif/core v2 and cannot handle ESM plugins.archie remains as an ESM package but its package.json is marked as private.
Currently, the only way to interact with archie is through its command. The plugin consumes those functionalities as-is. This could be improved in future iterations. E.g. import {build} from 'archie'; build({options});