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

nodeschool-assistant

v0.0.4

Published

Helper to manage NodeSchool websites

Downloads

4

Readme

NodeSchool Assistant

Organizing a NodeSchool requires a lot of logistics; from finding dates, venue and food to updating the website to reflect the upcoming event.

The goal of this assistant is to help you automate the tedious work of creating the event and updating the NodeSchool website just by asking you some questions. Easy, right? Let's go to the details.

Installation

npm install -g nodeschool-assistant mustache stylus

Setup (Convention Over Configuration)

To make our lives easy, NodeSchool Assistant follows the Convention-over-Configuration approach. So, it does the following assumptions:

  1. You have a .env file in your project where the configuration is stored (check the Environment Variables section for more details about the values required).
  2. Your NodeSchool website is hosted on Github (using Github Pages).
  3. The folder used as output for your HTML files is docs.
  4. You use mustache and stylus to generate your website (this will be eventually more flexible).
  5. The docs-src folder contains the sources for your website. There, you must have:
  • data.json file: stores the data for your website (if it doesn't exist, it will be created after generating an event).
  • images folder: holds your images (e.g. the social image generated by the assistant and any other image used by your website).
  • styles folder: holds your Stylus files (.styl).
  • templates folder: stores all the templates to generate your website. In there, you must have:
    • event-description.mustache: The template to create the event description (used in Meetup.com, for example).
    • index.mustache: The template to generate your website's index.html.
    • mentor-registration-issue.mustache: The template to create the Github ticket used for mentor registration.
    • social.mustache: The template to generate the HTML that will render your social image.

Environment Variables

These are the values required in the .env file inside the directory where your website lives:

  • CHAPTER_NAME: The default name of your chapter (e.g. "NodeSchool Seattle")
  • GITHUB_ORG: The github organization of your NodeSchool chapter (usually "nodeschool")
  • GITHUB_REPO: The github repo where you host the website for your chapter (e.g. "seattle")
  • GITHUB_API_TOKEN: Your personal github API token
  • GITHUB_API_USER: Your github username
  • MEETUP_API_KEY: Your Meetup.com API key
  • MEETUP_URLNAME: The URL Name of your group on Meetup.com (e.g. "Meetup-API-Testing")
  • MEETUP_GROUP_ID: The group ID of your group on Meetup.com (e.g. 1556336)
  • BING_MAPS_API_KEY: Your Bing Maps API key (to geolocate the venue during event creation)
  • GITHUB_REMOTE: (optional) The remote where you want to push when publishing (default: origin)
  • GITHUB_BRANCH: (optional) The branch you want to push when publishing (default: master)
  • SOCIAL_IMAGE_WIDTH: (optional) The desired width for your social image (default: 1200)
  • SOCIAL_IMAGE_HEIGHT: (optional) The desired height for your social image (default: 630)

Usage

You can use the NodeSchool Assistant via the nsa command.

Create event

nsa create-event --provider=meetup

The NodeSchool Assistant will ask you a series of questions regarding the new event (name, location, etc), update the data.json, regenerate the website and publish the new version pushing the changes to your Github repo. You can use the flags --no-publish and --no-build to avoid publishing or updating the website (although it's not recommended).

Build website

nsa build-website

Useful if you manually edit the sources of your website and want to regenerate the HTML and the social image. Use it in conjunction with publish-website to upload a new version of the website to Github.

Publish webste

nsa publish-website

In case you manually edit your HTML or built a new version (with build-website) and want to publish the changes.

TO-DO

If you want to contribute, here are a couple of things you might want to look at:

  • Put venue address in the github ticket and remove link to meetup.com event
  • Upload featured image to Meetup.com event
  • Fix lat,lng (location) when creating on Meetup.com
  • Improve data.json (add all the answers to the questions and create the file if it doesn't exist)
  • Add support for multiple event providers (for example, Eventbrite)
  • Add unit tests
  • Add input validations and default values
  • Improve config (only store base path and let each module handle the specifics)
  • Add flexible pipeline to generate website (like allowing custom commands) instead of hardcoding mustache and stylus. Maybe implementing something like a "recipe" or a list of bash commands that will be executed and must be defined somewhere in the source directory or just running something like npm run build