Skip to content

Starter template for writing Cavalry scripts

License

Notifications You must be signed in to change notification settings

scenery-io/create-script

Repository files navigation

create-script

A starter template for writing Cavalry scripts

Note

Want to publish your script on Scenery? Come talk to us on Discord or send us a message!

Features

  • Super fast bundling on changes
  • Import EcmaScript and Node modules
  • Encrypt scripts through Stallion
  • Import icons and include them as assets
  • Autocomplete for the whole Cavalry API
  • Package scripts in a zip with assets
  • Bundle multiple scripts together
  • Write in TypeScript or JavaScript

Quick Start

Tip

New to the JavaScript ecosystem? Read our getting started guide. The following info assumes you're familiar with Node and npm.

Create a new script template by running the following command on the command line. This will guide you through creating the template. It requires Node to be installed.

npm create @scenery/script@latest

Most other package managers such as yarn are also supported.

Follow the prompts and run the following command in the newly created folder to start developing.

npm run dev

Templates

You will be asked to choose one of the following templates.

Basic

Best for beginners. It contains the bare minimum to provide all the features.

Full-featured

Best for more experienced developers. It adds code formatting through Prettier, a changelog template and a .env.example file.

Documentation

Further details in the template readme.