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

fastify-website

v1.0.0

Published

A static website builder for metalsmith

Downloads

5

Readme

fastify-website

CircleCI

This project is used to build the website for fastify web framework and publish it online.

Requirements

  • Node 8.3.0+
  • Install dependencies with npm install

Build

To trigger the build of the website you just need to run:

npm run build

This will execute all the steps necessary to create a build (static website).

If you are developing you can run:

npm start

This will trigger the build and also start a live server that will allow you to visualize the changes you are performing on the website.

(note that every time you make a change to the assets that constitutes the content of the website you will need to launch npm run build:website to trigger a rebuild)

Build steps

In case you are interested in knowing more about how the build process works, here are the main steps that are performed during its execution:

  1. Cleanup: removes temporary resources that might have created from a previous build
  2. Temp folders creation: Creates the needed folders for the build process
  3. Get releases: uses the GitHub APIs to download the latest releases of Fastify so that the documentation pages can be regenerated dynamically.
  4. Process releases: processes the releases creating all the necessary dynamic files that are derivate from the original fastify releases (mostly used to generate and process documentation pages)
  5. Website generation: uses Metalsmith to compile a static version of the website.

Checkout the Package scripts to understand which files trigger these actions in case you want to have a look at the code for any of the steps described above.

Publishing

The publishing of the website is performed automatically through Circle CI (in a Continuous Delivery fashion).

Every time there's a change on master, if the build was created successfully, then it is automatically published on an S3 Bucket.

In order for this to work, Circle CI will need to be configured correctly providing all the necessary environment variables:

  • BUCKET_NAME: the name of the S3 bucket that hosts the website (the bucket needs to be already configured to serve static files)
  • AWS_ACCESS_KEY_ID: AWS access key of the machine user that has the rights to write files in the previously defined S3 bucket
  • AWS_SECRET_ACCESS_KEY: Secret access key for the key specified above

Contributing

Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue or by sending a pull request.

License

Licensed under MIT License. © Luciano Mammino.