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

create-ttpg-package

v1.4.2

Published

create-ttpg-package is a way to start building a new package for Tabletop Playground.

Downloads

6

Readme

What is this?

create-ttpg-package is a way to start building a new package for Tabletop Playground.

Requirements

  • Node (v18+ recommended)
  • Yarn (more on why in a minute)

Usage

typescript with JSX:

yarn create ttpg-package my-package --template tsx

typescript:

yarn create ttpg-package my-package --template typescript

vanilla javascript:

yarn create ttpg-package my-package --template javascript

Directories of Interest...

Once the workspace is initialized, you should find several points of interest.

  • src/** is where your scripts will go. Anything within src/ will be part of the package
  • assets/** is where you can keep your static assets that aren't scripts - for example, Textures and 3d Models that your package uses. You'll find any items that ttpg generates in here as well, such as thumbnails.
  • dev/ as part of the development process, create-ttpg-package will create this folder, and symlink it into your ttpg folder. This allows you to work directly within ttpg during your package development. You'll find your packaged marked with (Dev) within TTPG - that's this.

What else can I do?

  • yarn setup or ttpg-scripts setup - this will ensure you have all the needed configuration files and that the asset folders are created. You shouldn't need to run this unless something went wrong during the initialization of the workspace.
  • yarn dev or ttpg-scripts dev - this will create your './dev/ folder, transpile (or copy) your existing './src/' folder into './dev/Scripts/' and will symlink './dev/' into your ttpg folder. Net effect is that your development version will be available within ttpg.
  • yarn clean or ttpg-scripts clean - this will remove your ./dev/ folder (it's okay, nothing will actually be lost), and will remove your development build from TTPG.
  • yarn reset or ttpg-scripts reset - same as clean, but will also remove your local config file and ask you for your ttpg directory again.
  • yarn build or ttpg-scripts build - will create a production version of your package right into your ttpg folder (assuming one isn't there already). Once created, you'll be able to publish your package from within TTPG.
  • yarn purge or ttpg-scripts purge - this, once you confirm, will remove an existing production build from your ttpg folder. Proceed with caution. you can pass -y to override the confirmation, but don't do that unless you know what you're doing.

Why Yarn?

one of the build steps that create-ttpg-package comes with will transpile (if you're using typescript) or copy (if you're using vanilla javascript) your ./src/ folder into your development and production builds. Part of that includes gathering any dependencies that your scripts might have. Yarn is the only package manager that I know of that can gather production dependencies and shove them in a folder, thus, yarn is required.