6.1.0 • Published 4 years ago
@shopify/scripts-toolchain-as v6.1.0
Shopify Scripts AssemblyScript Toolchain
About this repo | How to use this repo | Contribute to this repo
About this repo
Introduction: CLI to build and bootstrap script projects.
| Current status | Ongoing |
| 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-asAvailable commands
shopify-scripts-toolchain-as bootstrapHelper to bootstrap script projects from Shopify's extension pointsshopify-scripts-toolchain-as codegenHelper to code generate MessagePack serializers for EP types in extension points.shopify-scripts-toolchain-as buildWrapper 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>fromthe source extension point from where the script project should be bootstrappeddestthe 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.jsonsrcthe name and location of the script's entrypointbinarythe name and the location to place the generated WebAssembly binarymetadatathe 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 --optimizeContribute 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.jsonandpackage-lock.json. You can do this manually, by runningnpm version <version>or by runningyarn 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
4 years ago
6.0.0
4 years ago
5.13.1
4 years ago
5.13.0
4 years ago
5.12.0
5 years ago
5.11.1
5 years ago
5.10.2
5 years ago
5.11.0
5 years ago
5.10.1
5 years ago
5.10.0
5 years ago
5.9.0
5 years ago
5.8.1
5 years ago
5.8.0
5 years ago
5.6.0
5 years ago
5.5.1
5 years ago
5.5.0
5 years ago
5.4.0
5 years ago
5.3.0
5 years ago
5.2.0
5 years ago
5.1.0
5 years ago
5.0.3
5 years ago
5.0.2
5 years ago
5.0.1
5 years ago
4.1.2
5 years ago
4.1.0
5 years ago
4.0.1
5 years ago
4.0.2
5 years ago
3.0.0
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.1
5 years ago
0.1.0
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago