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

doomd-scripts

v0.1.2

Published

Doomd's Node Scripts

Readme

DEPRECATED

This package has MOVED to @doomd/scripts. Please update your dependancies:

"devDependencies": {
  // REMOVE:
  "doomd-scripts": "^0.0.1"
  // ADD:
  "@doomd/scripts": "^0.0.1"
}

Doomd Scripts

Overview

This package will contain the simple node scripts that I find useful across my other (mostly Svelte/Sveltekit) projects. I got tired of copying and pasting code from one project to another...this is obviously the smarter way. It will be slow-going adding all my scripts because most of them need to be refactored to be more universal in scope before I can add them here.

Installation

For now, you problably only need to install this as a dev Dependancy:

# DEPRECATED:
[p]npm i -D doomd-scripts
# UPDATED:
[p]npm i -D @doomd/scripts

Scripts

doomd-insert-version

This script will generate a file that exports two const's (version and versionTS) which makes it easy to use these variables in your src files (in the footer of your page for example). The version number is copied from your package.json file. The file's contents will look like this:

// version.ts

export const version = '0.0.15'
export const versionTS = '2022-01-11T01:25:49.564Z'

The default output path is src/version.ts, but you can simply add the desired path (relative to the project's root directory) immediately after the command if you'd like to change it. For example, (from your project's root directory):

npx doomd-insert-version
# outputs to 'src/version.ts'

npx doomd-insert-version 'src/lib/site-details/version.ts'
# outputs to 'src/lib/site-details/version.ts'

Or you can add it to your package.json's scripts property before your build (so your source files can use the generated file's exports as variables). For example:

// package.json example usage:

"scripts": {
  "dev": "doomd-insert-version && svelte-kit dev",
  "prebuild": "doomd-insert-version",
  "build": "svelte-kit build",
}

After you've run a build, you might import the following into your index.ts file (for example):

// src/index.js

import { version, versionTS } from './version'
console.log(version)

// outputs: '0.0.15' (or whatever your pkg version is)

doomd-create-component-index

Running this script inside a Sveltekit project, will automatically create a list of all your svelte components and create an exports index file for you. This is particularly useful if you plan to package your components for npm publishing.

Running the default script without any arguments will look in src/lib for your components, and will output an index file at src/lib/index.ts. CAUTION: This will OVERWRITE any existing index files in the same path.

If your src directory looks like this:

src/
┣ lib/
┃ ┣ components/
┃ ┃ ┣ complicated/
┃ ┃ ┃ ┣ CoolComponent.d.ts
┃ ┃ ┃ ┣ CoolComponent.svelte
┃ ┃ ┃ ┣ CoolComponent.ts
┃ ┃ ┃ ┗ _Internal.svelte
┃ ┃ ┗ SimpleComponent.svelte
┗ routes/

Output will look like this:

// src/lib/index.ts
export { default as CoolComponent } from './components/complicated/CoolComponent.svelte'
export { default as SimpleComponent } from './components/SimpleComponent.svelte'

Default Arguments:

--srcpath='src/lib' # root directory of your components and where index file will be generated.
--from='.' # relative directory of components fromthe generated index file.
--internal  # Include internal component files that start with an "_"? Default is ommitted (false). Include the flag and it will be set to true.
--js # Index file extension. Default is ommitted (false) = 'index.ts'. Include the flag and it will be set to true = 'index.js'.

Example of command with arguments:

npx doomd-create-comp-index --srcpath='src/lib/components' --js

This will output the index file to src/lib/components/index.js

Links

Credits

Special thanks to:

  • Sensedeep for their guidance on publishing cjs and es6 modules with one codebase.