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

index-generator

v1.0.13

Published

Create a table of contents file that summarizes the links to the target file.

Downloads

18

Readme

Build Status Coverage Status APM

index-generator

Create a table of contents file that summarizes the links to the target file.

↓SAMPLE mode adaptive and mode Dark adaptiveSampleImage

↓SAMPLE mode responsive and mode Light responsiveSampleImage

Usage

const indexGenerator = require('index-generator');

indexGenerator();

Config

All configs sample

indexGenerator({
    htmlPath: './html/',
    distPath: './dist/',
    fileName: 'index.html',
    darkMode: true,
    construction: 'adaptive',
    prefixGroup: [
        {
            prefixName: 'd',
            title: 'Develop',
            titleIcon: 'keyboard',
            fileIcon: ["style","","","view_compact","","mood","code"]
        },
        {
            prefixName: 'p',
            title: 'Pages',
            titleIcon: 'description'
        },
        {
            prefixName: 'w',
            title: 'WorkSpace',
            titleIcon: 'create'
        }
    ],
    suffixDesktop: '-desktop.html',
    suffixMobile: '-mobile.html',
    suffixTablet: '-tablet.html',
    removeTitle: [' | TEST FILE', ' | TEST'],
    faviconPath: './image/favicon.ico',
    headTitle: 'headTitle',
    pageTitle: 'pageTitle',
    overview: 'overview',
    disclaimerTitle: 'disclaimerTitle',
    disclaimerDesc: 'disclaimerDesc',
    copyright: '© CopyrightSample.Inc'
});

configs parameters

| Parameter | Type | Default | Description | | ------------------ | ------- | -------------------------------- | ----------------------------------------------------------------- | | htmlPath | string | './html/' | Target html file storage location | | distPath | string | htmlPath | Location of index generated by this module | | fileName | string | 'index.html' | Index file name generated by this module | | darkMode | boolean | false | Generate in dark mode if true | | construction | string | 'responsive' | 'responsive' or 'adaptive' | | prefix | object | | Please refer to the following | | suffixDesktop | string | '-desktop.html' | For adaptive the name of the suffix that is treated as a desktop | | suffixMobile | string | '-mobile.html' | For adaptive the name of the suffix that is treated as a mobile | | suffixTablet | string | '-tablet.html' | For adaptive the name of the suffix that is treated as a tablet | | removeTitle | string/object | '' | You can specify the character string you want to delete for title | | faviconPath | string | '' | favicon path can be specified | | headTitle | string | 'index' | Specify the title string of the head | | pageTitle | string | 'pageTitle' | Specify h1 of the index | | overview | string | 'Overview text sample.' | Specify the summary of index | | disclaimerTitle | string | 'Disclaimer title sample' | Specify disclaimer title | | disclaimerDesc | string | 'Disclaimer description sample.' | Specify the content of disclaimer | | copyright | string | '© CopyrightSample.Inc' | Specify copyright |

prefix

Categories can be separated by prefix.
There are four settings as described in All configs sample.
prefixName:File name prefix
title:The title of the category
titleIcon:Set the name of the Google Material Icons. This is an icon placed next to the category title.
fileIcon:You can set an Google Material Icons for a file. It will be applied to the file in the order of the array.

suffix

Works only with adaptive.
If the file name excluding suffix matches, it will be treated as the same file.
Please adjust so that suffix does not overlap with the same file name