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

@rayners/foundry-dev-tools

v1.6.1

Published

Shared development tools and configurations for FoundryVTT modules

Readme

@rayners/foundry-dev-tools

Shared development tools and configurations for FoundryVTT modules.

Installation

npm install --save-dev @rayners/foundry-dev-tools

Usage

Rollup Configuration

Create or update your rollup.config.js:

import { createFoundryConfig } from '@rayners/foundry-dev-tools';

export default createFoundryConfig({
  cssFileName: 'styles/your-module-name.css',
  additionalCopyTargets: [
    { src: 'assets/**/*', dest: 'dist/' },
    { src: 'calendars', dest: 'dist' }
  ]
});

For modules that need directory output (like J&J):

import { createFoundryConfigWithDir } from '@rayners/foundry-dev-tools';

export default createFoundryConfigWithDir({
  cssFileName: 'styles/journeys-and-jamborees.css',
  additionalCopyTargets: [
    { src: 'templates/partials/*.hbs', dest: 'dist/templates/partials/' }
  ]
});

TypeScript Configuration

Create or update your tsconfig.json:

{
  "extends": "@rayners/foundry-dev-tools/configs/tsconfig.base.json",
  "compilerOptions": {
    "types": ["jquery"],
    "typeRoots": ["./node_modules/@types", "./src/types"]
  }
}

ESLint Configuration

Create or update your .eslintrc.json:

{
  "extends": ["@rayners/foundry-dev-tools/configs/eslint"]
}

Prettier Configuration

Create prettier.config.js:

export { default } from '@rayners/foundry-dev-tools/configs/prettier.config.js';

Or add to your package.json:

{
  "prettier": "@rayners/foundry-dev-tools/configs/prettier.config.js"
}

Vitest Configuration

Create or update your vitest.config.ts:

import { createFoundryTestConfig } from '@rayners/foundry-dev-tools/configs/vitest.config.js';

export default createFoundryTestConfig();

With custom coverage thresholds:

export default createFoundryTestConfig({
  test: {
    coverage: {
      thresholds: {
        global: {
          lines: 90,
          functions: 90
        }
      }
    }
  }
});

Features

  • Standardized Rollup Configuration: Automatic SCSS compilation, file copying, and GitHub release URL injection
  • TypeScript Configuration: Optimized for FoundryVTT module development
  • ESLint Rules: Foundry-specific globals and TypeScript best practices
  • Prettier Formatting: Consistent code formatting across all modules
  • Vitest Testing: Pre-configured for FoundryVTT module testing with jsdom environment
  • Development Server: Built-in dev server with live reload for faster development

Configuration Options

Rollup Options

  • cssFileName: Required - Output path for compiled CSS
  • additionalCopyTargets: Additional files to copy to dist
  • scssOptions: Override SCSS plugin options
  • typescriptOptions: Override TypeScript plugin options
  • useDevServer: Enable development server (default: process.env.SERVE === 'true')
  • devServerPort: Development server port (default: 30000)
  • outputFormat: 'es' for single file, 'dir' for directory output

Package.json Updates

After installing, you can remove these duplicate dependencies from your modules:

{
  "devDependencies": {
    // Remove these - they're now provided by @rayners/foundry-dev-tools
    "@rollup/plugin-node-resolve": "^15.0.0",
    "@rollup/plugin-typescript": "^11.0.0", 
    "@typescript-eslint/eslint-plugin": "^5.59.0",
    "@typescript-eslint/parser": "^5.59.0",
    "@vitest/coverage-v8": "^3.1.4",
    "eslint-config-prettier": "^10.1.5",
    "eslint-plugin-prettier": "^5.4.0",
    "jsdom": "^26.1.0",
    "rollup-plugin-copy": "^3.4.0",
    "rollup-plugin-scss": "^4.0.0",
    "sass": "^1.62.0",
    "tslib": "^2.5.0"
  }
}

GitHub Packages

This package is published to GitHub Packages. Make sure your .npmrc includes:

@rayners:registry=https://npm.pkg.github.com

License

MIT