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

@namphuongtechnologi/create-template

v0.0.9

Published

Tài liệu này mô tả các bước chuẩn để đóng gói và phát hành CLI `create-template` lên npm Registry.

Readme

Hướng dẫn publish create-template lên npm

Tài liệu này mô tả các bước chuẩn để đóng gói và phát hành CLI create-template lên npm Registry.

1. Chuẩn bị

  1. Node & npm: đảm bảo đang dùng Node 18+ và npm 8+ (đồng bộ với file .nvmrc).
  2. Quyền publish: tài khoản npm phải có quyền publish tới namespace/organization mong muốn.
  3. Clean workspace: commit hoặc stash thay đổi trước khi build.

2. Kiểm tra và build

# Cài đặt dependencies toàn repo
npm install

# Build CLI TypeScript -> dist/
npm run build

# Build & lint template web để đảm bảo không lỗi
npm run template:lint
npm run template:build

Sau khi build, thư mục cli/create-template/dist phải tồn tại với file index.js có shebang (#!/usr/bin/env node).

3. Cập nhật version

  • Increment version trong cli/create-template/package.json theo chuẩn semver.

  • Có thể dùng npm để tăng version trực tiếp:

    npm version <major|minor|patch> --workspace @namphuongtechnologi/create-template
  • Đồng thời cập nhật tag version trong package-lock.json (hoặc xoá lock file và chạy npm install).

  • Commit thay đổi trước khi publish.

4. Đóng gói thử (tùy chọn)

npm run pack
# Kết quả: artifacts/create-template-<version>.tgz

Có thể cài đặt gói .tgz này vào dự án khác để smoke test CLI:

npm install -g ./artifacts/create-template-<version>.tgz
create-template --help

5. Publish lên npm

# Đăng nhập npm (nếu chưa)
npm login

# Publish với access public (chạy tại root repo)
npm publish --workspace @namphuongtechnologi/create-template --access public

Nếu publish thất bại do tên gói đã tồn tại, cần tăng version hoặc đổi tên package.

6. Kiểm tra sau publish

  • Truy cập https://www.npmjs.com/package/create-template (hoặc namespace tương ứng) để xác nhận version mới.
  • Chạy npx create-template@latest --help để đảm bảo npm registry phân phối đúng binary.

7. Cập nhật tài liệu

  • Ghi chú version mới trong repo (ví dụ changelog, README).
  • Thông báo cho team về version vừa phát hành và các thay đổi quan trọng.

Tip: Nếu publish thất bại với lỗi 403 hoặc 404, kiểm tra quyền trên npm organization và đảm bảo package name trong package.json khớp với namespace được cấp quyền.