@shopify/shopify-cli-extensions v3.21.0
Shopify CLI Extensions
The Shopify CLI Extensions command line tool allows you to build a UI Extensions. It comes packaged with Shopify CLI, so when you create an extension using Shopify CLI's shopify extension create command, your project will automatically consume this package.
Start using this tool by creating an extension with Shopify CLI
Installation
When consumed in a project, the command shopify-cli-extensions becomes available to the project. The command can be used to build UI Extensions.
To install this package in an UI Extension project, run:
npm install @shopify/shopify-cli-extensionsor
yarn add @shopify/shopify-cli-extensionsBuilding a UI Extension for development
You can run the shopify-cli-extensions serve to build your extension and automatically trigger a re-build when the source files are changed.
npm shopify-cli-extensions serveor
yarn shopify-cli-extensions serveBuilding a UI Extension for production
You can run the shopify-cli-extensions build to build a minified version of your extension.
npm shopify-cli-extensions buildor
yarn shopify-cli-extensions buildGetting the extension config
If you are using your own build tools, you can get access to the extension configs by using the getConfigs utility provided. This utility will read your extension config and return a JSON object.
import {getConfigs} from '@shopify/shopify-cli-extensions';
const configs = getConfigs();
// TODO: do something with the configs3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago