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

reseed

v2.2.3

Published

Reseed is an open-source tool for integrating static sites into subpaths.

Downloads

854

Readme

Reseed

Reseed is an open-source tool for integrating static sites into subpaths.

Requires node >=10.0.0

Build Status codecov

Contents

Installation & Usage

Install with npm globally: npm install -g reseed or as a dev dependency: npm install -D reseed.
Then run using the following structure:

$ reseed [command] [options]

For example: reseed -s path/to/src -d path/to/dest -b baseurl

Once installed you can also set up your package.json with a custom script, such as:

{
  "scripts": {
    "reseed": "reseed -s path/to/src -d path/to/dest -b baseurl"
  }
}

Then use npm run reseed within your project.

Alternatively, you can use npx to avoid installing reseed as a dependency.
For example: npx reseed -s path/to/src -d path/to/dest -b baseurl

Commands

All commands (except clean) require both baseurl and dest options set.
The clean command only requires the dest option set.

See Options for more info.

reseed

Cleans destination directory, and copies files from src to dest/baseurl. CSS and HTML files have their hrefs/urls/etc (excluding external links) rewritten so that baseurl is prepended.

Example:

$ reseed -s path/to/src -d path/to/dest -b baseurl

reseed clean

Deletes all files in the destination directory.

Example:

$ reseed clean -d path/to/dest

reseed clone-assets

Copy all files (excluding CSS and HTML) from source to destination/baseurl without altering the data.

Example:

$ reseed clone-assets -b baseurl -d path/to/dest

reseed rewrite-css

Copies css files from src to dest/baseurl. Then rewrites the newly copied files so that urls/hrefs/etc that reference local content have baseurl prepended to them.

Example:

$ reseed rewrite-css -b baseurl -d path/to/dest

reseed rewrite-html

Copies html files from src to dest/baseurl. Rewrites the newly copied files so that internal urls/hrefs/etc have baseurl prepended to them.

Example:

$ reseed rewrite-html -b baseurl -d path/to/dest

reseed rewrite-sitemap

Copies the sitemap from src to dest/baseurl. Rewrites the copied file so that links have baseurl prepended to them. If the provided file is a sitemap index, the referenced sitemaps will be processed similarly.

The sitemap (or sitemap index) file can be specified using the -m | --sitemap option. If no sitemap file is specified, will default to sitemap.xml.

Example:

$ reseed rewrite-sitemap -b baseurl -d path/to/dest -m sitemapindex.xml

reseed rewrite-rss

Copies the specified RSS file(s) from src to dest/baseurl. Rewrites the copied file(s) so that links have baseurl prepended to them.

The RSS file must be specified using the -r | --rss option. This option is a glob. The specified file(s) must have the .xml extension.

If using a glob with wildcards (*) you must wrap the glob in quotes. See the example below.

Example:

$ reseed rewrite-rss -b baseurl -d path/to/dest -r "**/index.xml"

reseed serve

Runs reseed, then serves the files on a local webserver, so that they may be viewed in a browser. Then runs watch.

Example:

$ reseed serve -s path/to/src -d path/to/dest -b baseurl

reseed watch

Continuously watches the src directory to check for changes. If a change occurs, a new build is triggered, and the browser is then reloaded.

Example:

$ reseed watch -s path/to/src -d path/to/dest -b baseurl

Ignore

Prevents reseed from adding the baseurl infront of an elements path

<a href="/manual" reseed-ignore>Click me!</a>

Options

Option | Alias | Type | Description ------------- | ----- | ------- | ----------- --source | -s | String | The source folder to clone. Defaults to current working directory. --dest | -d | String | The destination folder to clone the files to. --baseurl | -b | String | The filename to prepend to the files in the source. --port | -p | Integer | The port number to serve the cloned site on. --extrasrc | -e | String | Extra src attribute to be rewritten.Can set multiple attributes by specifying the flag multiple times. --sitemap | -m | String | Path to the index sitemap. Defaults to sitemap.xml. --rss | -r | String | Glob to rss file or files. --overwrite | -o | Boolean | When cleaning --dest, don't prompt for confirmation. --split | | Integer | The number of partitions to divide files into. --partition | | Integer | The partition number to process. --help | | Boolean | Show help in the terminal