6.1.0 • Published 3 years ago

@shopify/scripts-toolchain-as v6.1.0

Weekly downloads
984
License
UNLICENSED
Repository
github
Last release
3 years ago

Shopify Scripts AssemblyScript Toolchain

Build status

About this repo | How to use this repo | Contribute to this repo

About this repo

Introduction: CLI to build and bootstrap script projects.

Current statusOngoing
Owner@Shopify/scripts
Help#scripts on Slack

How to use this repo

Requirements

  • npm
  • All commands should be used inside a script project generated with Shopify's App CLI

Installation

npm install -g @shopify/scripts-toolchain-as

Available commands

  • shopify-scripts-toolchain-as bootstrap Helper to bootstrap script projects from Shopify's extension points
  • shopify-scripts-toolchain-as codegen Helper to code generate MessagePack serializers for EP types in extension points.
  • shopify-scripts-toolchain-as build Wrapper around the AssemblyScript compiler. It used to build script projects ensuring compatibility with Shopify's runtime platform.

Usage

Bootstrap
shopify-scripts-toolchain-as bootstrap --from <extension-point-name> --dest <destination dir>
  • from the source extension point from where the script project should be bootstrapped
  • dest the destination location where the bootstrapped script project is going to be placed
Codegen
shopify-scripts-toolchain-as codegen \
  --interface-definition=EP/interface.ts \
  -- --lib=./node_modules --optimize --use Date=
Build
shopify-scripts-toolchain-as build \
  --src ./myscript.ts \
  --binary ./myscript.wasm \
  --metadata ./metadata.json
  • src the name and location of the script's entrypoint
  • binary the name and the location to place the generated WebAssembly binary
  • metadata the name and location to place the generated script's metadata

Since this tool is a wrapper around the AssemblyScript's compiler, additional commands can be passed down to the AssemblyScript compiler CLI

npx shopify-scripts-toolchain-as build \
  --src=sample/script.ts \
  --binary=sample/build.wasm \
  --metadata ./metadata.json \
  -- --lib=node_modules --lib=sample --validate --optimize

Contribute to this repo

Setup

  • Clone the repository
  • Install dependencies via npm install

Running tests

  • Run npm test

Making changes

  • Open a PR
  • Request a review from someone from the Scripts team (@Shopify/scripts, @Shopify/scripts-experience)
  • Once your PR is reviewed and approved, merge it

Deploying / releasing a new version

  • Once your PR is merged, update the version of the package.json and package-lock.json. You can do this manually, by running npm version <version> or by running yarn version. In this repo we try to follow semantic versioning as much as possible, be mindful when releasing a new version.
  • Go to shipit and deploy your change. Please note that shipit only deploys changes that define a new version.
6.1.0

3 years ago

6.0.0

3 years ago

5.13.1

3 years ago

5.13.0

3 years ago

5.12.0

3 years ago

5.11.1

3 years ago

5.10.2

3 years ago

5.11.0

3 years ago

5.10.1

3 years ago

5.10.0

3 years ago

5.9.0

3 years ago

5.8.1

3 years ago

5.8.0

3 years ago

5.6.0

3 years ago

5.5.1

3 years ago

5.5.0

3 years ago

5.4.0

3 years ago

5.3.0

3 years ago

5.2.0

3 years ago

5.1.0

3 years ago

5.0.3

3 years ago

5.0.2

3 years ago

5.0.1

3 years ago

4.1.2

3 years ago

4.1.0

3 years ago

4.0.1

3 years ago

4.0.2

3 years ago

3.0.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

0.1.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago