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-twitch-ext

v0.0.3

Published

A CLI tool to easily create a Twitch Extension from scratch

Downloads

7

Readme

Create Twitch Ext(ension)

A node.js CLI tool to generate a Twitch Extension project for you. If your familiar tools like create-react-app, that was our inspiration for this tool!

What can it do?

create-twitch-ext was created to take take the guess work out of making a Twitch Extension. Run the command npx create-twitch-ext, answer a few questions, and have it generate a baseline Twitch Extension so you can get to developing right away.

Right now it has support for generating a very simple Twitch Extension project using Vanilla JavaScript template. But in the near future the hope is to provide options to generate a Twitch Extension project for all major UI libraries like ReactJS, Vue.js, Angular and more.

How do I use it?

I tried to make this CLI tool as easy to use as possible and I hope you agree.

Minimum Requirements: Node > 8

Getting Started:

npx create-twitch-ext <project-name>

You will then be asked a couple of questions.

  • Which project template you would like? (Only Vanilla JavaScript Template Supported)
  • Select which type(s) you are creating

Boom your done! Your project should be created and your ready to getting coding.

Contributing a template

Want to contribute a template for create-twitch-ext? Awesome! Couple things like to go over before you get started.

Philosophies:

  • Templates should be minimal base for getting a user starting developing.
  • Try not to be overlay opinionated about how the template is configured. You should provide the foundation to get started with out handcuffing them or confusing the coder with fancy implementations.
  • Existing templates are not opinionated by design, don't try making pull request to add X or Y library

If you have a cool Twitch Extension project that uses ReactJS with the latest state management hotness and other cool bell and whistles? The add it as a template!

How do I add my template?

  1. Fork the repository

  2. Create a folder for your new template inside template folder. Name it after

  3. Inside your template folder create a template.json file and create a folder called template

  4. The template.json will contain the template dependencies. It will contain 3 main things.

    • Regular project dependencies dependencies
    • Development dependencies devDependencies
    • npm scripts to run the resulting projects

    If you look at the template-plain project you will notice that the devDependencies declares the dependencies and desired version. This by design to lock all our development dependencies because those usually are more brittle and breaking on version updates for things like Webpack and associated plugins.

  5. The template folder will house the code for your new template. There should be a few things in your template folder to complete things.

    • webpack-template.json. This houses HTML template the various Twitch Extension views will use when selected by the user and generated. Take a look at templates/template-plain/webpack-template.json to see how this is setup. You should only have to modify the template attributed if your have custom HTML templates for the various views.
    • webpack.common.ejs. I recommend copying over the one inside template-plain and adjusting it so that you have all the webpack plugins for your template to run. CLI tool will use the webpack.common.ejs and inject the the users selected HTML views they want to generate and then output it as webpack.common.js.
    • webpack.dev.js configuration for development mode
    • webpack.prod.js configuration for product build to upload to Twitch Dev
    • src folder containing your template code.
    • gitignore, yes not .gitignore, this will be renamed when the user project is created
    • A README.md so the user know how to use the generated project from your template

    You will notice there is now package.json file. This will be generated based off the dependencies and scripts you specified in template.json file.

  6. Update src/prompts/askForTemplateTypes.ts and add your news template to the array of templates.

  7. After all that is done, create a Pull Request to talk2megooseman/create-twitch-ext to get your new template reviewed and merged!