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

@perseveranza-pets/freya

v0.70.1

Published

Opinionated JSX based slides generator.

Downloads

115

Readme

@perseveranza-pets/freya

Version Dependencies

Opinionated static site generator.

http://sw.cowtech.it/dante

Installation

npx --package=@perseveranza-pets/dante -- create-dante-site my-site
cd my-site
npm install
dante dev

Usage

Creating pages and files

Simply create all file needed in the build function in src/build/index.ts. You can use any framework you want, the predefined one is React.

We strongly recommend to use the createFile function exported from dante to create file as it will take care of replacing $hash in the file name with the actual file hash.

The function must return an object containing the following properties:

  • css: A css to be injected in each generated HTML page.

All properties can be (async) function that will be called for each page at runtime.

Customizing the server

If you want to customize the local server, you can create a setupServer function in src/build/server.ts. The function will receive a fastify server instance and build context.

The function can optionally return an object containing the following properties:

  • directory: A subdirectory in the dist folder to server HTML files from.

Exporting

Once you have done editing, you should execute dante build. The website will be exported in the dist folder.

Adding commands to Dante

You can create a file src/build/cli.ts that should export a setupCLI function. The function will received a commander program and a pino logger in order to modify the Dante CLI.

Customize create-dante-site

You can create a file src/build/create.ts that should export a createSetupCLI function. The function will received a commander program and a pino logger in order to modify the Dante CLI.

Environments variables

  • DANTE_BUILD_FILE_PATH: The build file path. Default is src/build/index.ts.
  • DANTE_SERVER_FILE_PATH: The server file path. Default is src/build/server.ts.
  • DANTE_CLI_PATH: The CLI customization file path. Default is src/build/cli.ts.
  • DANTE_CREATE_PATH: The CLI customization file path. Default is src/build/create.ts.
  • DANTE_BASE_TEMPORARY_DIRECTORY: The local directory in which transpile TypeScript files before building. Default is .dante.
  • DANTE_WATCH_MODULES: If to restart the process when the Dante files in the node_modules folder are changed.
  • DANTE_WATCH_ADDITIONAL_PATHS: Which additional paths to watch.
  • DANTE_NODE_ADDITIONAL_OPTIONS: Additional options to pass to the node executable.
  • DANTE_PROGRAM_NAME: The name to show when doing dante --help. This is mostly for NPM modules extending Dante.
  • DANTE_PROGRAM_DESCRIPTION: The name to show when doing dante --help. This is mostly for NPM modules extending Dante.

ESM Only

This package only supports to be directly imported in a ESM context.

For informations on how to use it in a CommonJS context, please check this page.

Contributing to dante

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

Copyright

Copyright (C) 2022 and above Shogun ([email protected]).

Licensed under the ISC license, which can be found at https://choosealicense.com/licenses/isc.