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

generator-beet

v1.1.1

Published

Yeoman generator for beet projects

Downloads

8

Readme

generator-beet

License NPM version semantic-release

Yeoman generator for Beet projects

Table of Contents

Getting started

Install generator

Install Yeoman and generator-beet using npm (assuming you have pre-installed node.js)

npm install -g yo generator-beet

Install Poetry

It's recommended to create a Python project:

  • Ensures you have beet correctly installed
  • Required for Github releases
  • Easier beet plugin development

Generating Python projects requires Poetry: OSX / Linux:

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -

Windows (Powershell):

(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -

(More on how to install Poetry)

Generate a new beet project

yo beet

Features

Datapack boilerplate

datapack
└╴data
  ├╴minecraft
  │ └╴tags
  │   └╴functions
  │     ├╴load.json # Registers 'load' function
  │     └╴tick.json # Registers 'tick' function
  └╴<authorNamspace>
    └╴functions
      └╴<projectNamespace>
        ├╴tick.mcfunction # Called once every tick
        └╴load.mcfunction # Called after datapack is (re)loaded

To prevent naming conflicts between datapacks, all your functions, advancements, etc are located in the unique namespace <authorNamespace>:<projectNamespace>. E.g. if the author is Oran9eUtan and the project name is Teleporter, the load function can be called like this: function oran9eutan:teleporter/load

Resourcepack boilerplate

resourcepack
├╴assets
│ ├╴.mcassetsroot
│ └╴minecraft
│   ├╴models
│   └╴textures
└╴pack.png

Github Releases

Automatically generates releases of your data-/resourcepacks on Github.

.github
└╴workflows
  └╴release.yml

How to create a new release:

  1. Push/Pull-Request to the release branch on Github
  2. The release action gets automatically triggered
  3. semantic-release analyses commits to determin if a new version is required
  4. semantic-release bumps version, updates CHANGELOG.md, runs beet -c beet-release.json build and creates a new Github release

(More on Github Actions)

Available commands

# Generate new beet project
yo beet [project-name]
    --datapack       # Generate datapack
    --resourcepack   # Generate resourcepack
    --license        # Include a license
    --git            # Initialize git repository
    --python         # Create a Python project

# Only generate datapack
yo beet:datapack

# Only generate resourcepack
yo beet:resourcepack

Contributing

Generator structure

A yeoman generator consists out of multiple sub-generators composed together. Each of them has their own directory in generators, the default beeing generators/app. Each sub-generator can be run like so: yo beet:<sub-generator>.

# Directory structure:
generators/
├─app
├─datapack
├─git
├─poetry
└─resourcepack

Test the generator

To try out the generator during development, run this command from the root of the project. It installs your local files as a symlinked global module.

npm link

To remove it run this command from the root directory of the project.

npm unlink generator-beet

License

MIT © Oran9eUtan