About This Project

A template project for creating a TypeScript package for npm.

New Package Steps

Follow these steps after creating a new repository from this template. The same steps appear in README.md, docs/index.md, and .github/copilot-instructions.md; keep all three copies identical until the final step removes them.

  1. In package.json, update name, version, description, author, homepage, repository.url, bugs.url, and keywords for the new package and repository.
  2. In .github/workflows/package-publish.yml, change the scope of the GitHub Packages job (@blwatkins) to the GitHub account or organization that owns the new repository. GitHub Packages requires the package name’s scope to match that owner. If the npm scope of the new package does not match it, remove the publish-github job instead, rename the workflow to drop “GitHub Package” from its name, and remove GitHub Packages from the “Tech Stack” section and from the name and description of the package-publish.yml row of the “GitHub Actions CI” table in .github/copilot-instructions.md.
  3. In tsdown.config.ts, rename globalName for the new package. It only applies to IIFE or UMD output, so remove it and outputOptions.globals if the package will only ever ship ESM.
  4. Replace the hello-world example module:
    • Replace src/hello-world/ and test/hello-world/ with the package’s own modules, and re-export each module from src/index.ts.
    • Point the entryPoints in typedoc.json at each module’s index file.
    • Update the “Directory Structure” section of .github/copilot-instructions.md.
  5. In typedoc.json, update navigationLinks and customFooterHtml.
  6. In docs/_config.yml, update title, description, and minima.social_links. Leave the npm social link url as '#' until the first publish.
  7. In README.md and docs/index.md, update the title, description, documentation links, and every badge and link that names @blwatkins/template or npm-typescript-package-template.
  8. Remove the sample documentation:
    • Delete the contents of docs/doc/ and docs/releases/.
    • Remove the sample entries from docs/releases.md, and update its front matter author and description.
    • Replace the content of docs/resources-and-references.md, and update its front matter author and description.
  9. Update the owners in .github/CODEOWNERS and the accounts in .github/FUNDING.yml, or remove FUNDING.yml.
  10. Update the copyright holder and year in LICENSE, every file header, velocity-copyright-template.txt, the footer of README.md, and docs/_includes/footer.html.
  11. Review .github/copilot-instructions.md:
    • Update the “Project Overview” section.
    • Decide whether to keep the shared error type, assertion, and type guard conventions. To keep them, add @blwatkins/utils as a dependency. To drop them, remove the sections that reference @blwatkins/utils.
  12. Run npm install to regenerate package-lock.json for the new package name, then run npm run validate.
  13. Remove this “New Package Steps” section from README.md, docs/index.md, and .github/copilot-instructions.md.

Documentation

License

The source code of this project is licensed under the MIT License. The full text of the license is included with the project source code.

npm

npm License npm Version npm @alpha Version npm Types npm Node Version npm Weekly Downloads npm Total Downloads npm Last Update npm Unpacked Size

Socket

Socket Score

Bundlephobia

Package Phobia

Package Phobia Install Size Package Phobia Publish Size

GitHub

GitHub License GitHub Dependabot GitHub Latest Release GitHub Releases GitHub Last Commit GitHub Commits GitHub Commit Activity GitHub Code Size in Bytes GitHub Repo Size GitHub Repo File or Directory Count GitHub Language Count

GitHub Actions

CodeQL npm Validate Deploy GitHub Pages with Jekyll

Sources and Technical Notes

Thank Yous

A huge thank you to all the open source contributors who have made this project possible by creating and maintaining the libraries and tools used in this project, and to the open source community for fostering collaboration and innovation.

A special thank you to all the educators, mentors, and content creators who have shared their knowledge and expertise in the fields of algorithmic art, web development, and computer science. Thank you for giving me the tools, resources, opportunities, support, and inspiration to learn and grow as a developer.