npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@shopify/scripts-toolchain-as

v6.1.0

Published

Shopify's AssemblyScript toolchain to build, verify and bootstrap scripts

Downloads

226

Readme

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 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-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.