Socket
Book a DemoInstallSign in
Socket

@shopify/argo-checkout

Package Overview
Dependencies
Maintainers
19
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/argo-checkout

The API for Argo extensions that run in Shopify’s Checkout

latest
npmnpm
Version
0.10.3
Version published
Maintainers
19
Created
Source

@shopify/argo-checkout

This library contains type definitions and other utilities for writing Argo extensions in Shopify’s checkout. However, nothing in this library is strictly required to write an Argo extension. As a developer building an Argo extension, you can forego the utilities this library provides entirely, and instead use the global shopify API directly in a plain JavaScript file. The script below is a valid Argo script without any additional processing:

shopify.extend('Checkout::Feature::Render', (root, api) => {
  const button = root.createComponent('Button', {
    onPress() {
      console.log('Upsold!');
      api.done();
    },
  });

  button.appendChild('Buy now');

  root.appendChild(button);
});

Keeping in mind that any utility provided by this library is only a convenience API on top of the shopify global, the rest of the documentation for this library will show examples using JavaScript imports from the @shopify/argo-checkout library. Using JavaScript modules in this way requires a build step, but can provide useful developer experience features and opportunities for build-time performance optimizations.

Getting started

Before you dig in to what this library has to offer, please read through the getting started guide.

API

This package provides utilities, types, and documentation for the many different APIs an Argo extension can access. Before you write your first extension, you should read through the following documentation in order:

Once you’ve read the documents above, you’re ready to write a checkout extension. If you’re wanting to learn even more, this repo has a few additional guides that cover techniques for writing larger, more complex extensions:

FAQs

Package last updated on 31 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts