{"repo":"Regaez/datastar-plugin-starter","free":true,"listed":false,"github":"https://github.com/Regaez/datastar-plugin-starter","clone":"git clone https://github.com/Regaez/datastar-plugin-starter.git","description":"A starter template for creating Datastar plugins, or Rocket components, using Typescript","language":"HTML","stars":16,"topics":["datastar","plugin","template","typescript","rocket","datastar-pro","boilerplate","starter-template"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"Datastar Plugin Starter This is a starter template to help you easily create new Datastar plugins, or Rocket components, with Typescript. [!IMPORTANT] In order to use this template, you should not fork this repo, but rather utilise the Use this template feature in Github. Getting started - Install the latest version of NodeJS and pnpm. - Run pnpm i to install dependencies. [!TIP] Since the Datastar repo does not contain a package.json file, you will encounter issues installing its Github repo as a dependency via npm . Therefore it is advised to use pnpm instead. Scripts The template provides 2 scripts for you: - pnpm build : Compiles the plugin source code to Javascript - pnpm watch : Watches the src directory for changes and recompiles the plugin code while running a web server that serves the root directory Developing your plugin The project directory structure is as follows: To begin, start by editing the src/index.ts file. A basic action plugin example is provided for you by default; you should replace this with your desired plugin code. Datastar supports 3 types of plugins: action , attribute , and watcher . Simply adjust the import statement at the top of the file to import the relevant plugin type registration function: You may also want to create Rocket components. If so, please refer to the Using Datastar Pro section below for additional setup requirements. Prefer to use Javascript? No problem, the builds scripts are configured to compile any .js files in the src dir","default_branch":null,"files":null,"tree":[],"storefront":"/r/Regaez","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Regaez/datastar-plugin-starter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}