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 🙏

© 2026 – Pkg Stats / Ryan Hefner

gulp-sitemap-generator

v0.2.0

Published

auto generate sitemap for development

Readme

gulp-sitemap-generator

  • auto generate sitemap for development.
  • It finds Web page files in the project and collects the path, file name and meta tag.

프로젝트 내에 웹페이지 파일을 찾아 경로와 파일명 그리고 메타태그(title,author,description)를 수집해서 정리해줍니다. (html파일명을 한글로 작성하지 마세요)

Installation

Code Example

gulpfile.js

gulp.task('html', () => {
    return gulp.src([`/app/**/*.html`, `!/app/map.html`])
        .pipe(sitemap({
          'dest': 'dest', //*Required Options
          'app': 'app' //*Required Options
          'stream' : false //Only map.html files can be steamed
        }))
        .pipe(gulp.dest(`/dest`))
});

map.html

<h2><%= folderNames[0] %> directory</h1>
<table>
    <thead>
        <tr>
            <th><span>title</span></th>
            <th><span>directory</span></th>
            <th><span>filename</span></th>
            <th><span>author</span></th>
            <th><span>description</span></th>
        </tr>
    </thead>
    <tbody>
        <% _.each(maps, function(m) { %>
        <tr>
            <td><span><%= m.title %></span></td>
            <td><span><%= m.href %></span></td>
            <td><a href="<%= m.href %>" target="_blank"><%= m.name %></a></td>
            <td><span><%= m.author %></span></td>
            <td><span><%= m.description %></span></td>
        </tr>
        <% }); %>
    </tbody>
</table>

webpage in your project

map.html after build

| title | directory | filename | author | description | | ------------- | ---------------------------- | -------- | ----------------- | ---------------------- | | a-title | /app/html/a.html | a.html | author (meta tag) | description (mata tag) | | b-title | /app/html/b.html | b.html | author (meta tag) | description (mata tag) | | c-title | /app/html/sub1/c.html | c.html | author (meta tag) | description (mata tag) | | d-title | /app/html/sub1/d.html | d.html | author (meta tag) | description (mata tag) | | e-title | /app/html/sub1/e.html | e.html | author (meta tag) | description (mata tag) | | f-title | /app/html/sub1/sub1-1/f.html | f.tml | author (meta tag) | description (mata tag) | | g-title | /app/html/sub1/sub1-1/g.html | g.tml | author (meta tag) | description (mata tag) | | h-title | /app/html/sub1/sub1-2/h.html | h.html | author (meta tag) | description (mata tag) | | i-title | /app/html/sub1/sub1-2/i.html | i.html | author (meta tag) | description (mata tag) |

Options

    pipe(sitemap({
        dest : 'destFolder',
        app : 'appFolder',
        name : 'map.html',
        noDir : 'etc',
        untitle : '-', //When the title can not be found in the meta information
        unknown : '-', //When the author can not be found in the meta information
        noDescription : '-' //When the description can not be found in the meta information
        division : 'html' //Subfolders for app options.
                          //Template modifications are required. I'll explain it further below.
    }))

Options - division

It can be multi-expressible on the basis of this

set options

    division : 'html'

map.html

    <div>
    <h1>gulp-sitemap-generator</h1>
    <% _.each(maps, function(map,idx) { %>
    <h2><%= folderNames[idx] %></h1>
    <table class="table">
        <thead>
            <tr>
                <th><span>title</span></th>
                <th><span>directory</span></th>
                <th><span>filename</span></th>
                <th><span>author</span></th>
                <th><span>description</span></th>
            </tr>
        </thead>
        <tbody>
            <% _.each(map, function(m) { %>
            <tr>
                <td><span><%= m.title %></span></td>
                <td><span><%= m.href %></span></td>
                <td><a href="<%= m.href %>" target="_blank"><%= m.name %></a></td>
                <td><span><%= m.author %></span></td>
                <td><span><%= m.description %></span></td>
            </tr>
            <% }); %>
        </tbody>
    </table>
    <% }); %>
</div>    

webpage in your project

map.html after build

sub1

| title | directory | filename | author | description | | ------------- | ---------------------------- | -------- | ----------------- | ---------------------- | | a-title | /app/html/sub1/a.html | a.html | author (meta tag) | description (mata tag) | | b-title | /app/html/sub1/b.html | b.html | author (meta tag) | description (mata tag) |

sub2

| title | directory | filename | author | description | | ------------- | ---------------------------- | -------- | ----------------- | ---------------------- | | c-title | /app/html/sub2/c.html | c.html | author (meta tag) | description (mata tag) | | d-title | /app/html/sub2/d.html | d.html | author (meta tag) | description (mata tag) |

sub3

| title | directory | filename | author | description | | ------------- | ---------------------------- | -------- | ----------------- | ---------------------- | | e-title | /app/html/sub3/e.html | e.html | author (meta tag) | description (mata tag) | | f-title | /app/html/sub3/sub3-1/f.html | f.html | author (meta tag) | description (mata tag) |

sub4

| title | directory | filename | author | description | | ------------- | ---------------------------- | -------- | ----------------- | ---------------------- | | g-title | /app/html/sub4/g.html | g.html | author (meta tag) | description (mata tag) | | h-title | /app/html/sub4/h.html | h.html | author (meta tag) | description (mata tag) |

License

[email protected]