0.0.4 • Published 2 years ago

zaraz-mc-worker-template v0.0.4

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Zaraz MC worker template provides a template for deploying Custom MC workers. Custom MC workers can be configured as Custom Tools within Cloudflare Zaraz from Add new Tool page.

Usage

💡 Prerequisite: To deploy a new worker you need to install Wrangler and to run wrangler login before anything else

Using npx

Your managed component should be bundled before passing the file to the npx command

npx zaraz-mc-worker-template -c /path/to/your/managed/component.js -n custom-mc-your-mc-worker-name

Cloning this repository

This should give you much more flexibility if you are comfortable with wrangler and workers in general

  • Clone this MC Worker Template
  • Copy your MC files to ./src(it's recommended to create a new folder within ./src if you're not using an already bundled MC)
  • Import your component in index.ts by replacing this line import component from './component.js' with your import
  • Edit wrangler.toml if you need to change the worker name or if you're using a more complex worker configuration for your MC
  • Run wrangler publish
0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago