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

trism

v0.8.1

Published

TypeScript Multiple Package Builder (like Monorepo)

Readme

trism

Node.js에서 복잡한 설정없이 여러개의 Package를 만들기 위한 도구입니다.

Install

설치하고, 초기화 해줍니다.

npm install trism --save-dev
npx trism init # it will create files that `tsconfig.json` and `.packages/packages.yaml`

package.jsonscripts를 추가해줍니다.

{
  "private": true,
  "scripts": {
    "build": "trism build",
    "publish": "npm test && trism build && trism publish",
    "test": "jest --colors"
  }
}

Commands

  • trism build : Package들을 dist/ 디렉토리로 Build 합니다.
  • trism publish : dist/에 빌드된 Package들을 Registry로 Publish 합니다.
    • --force : CI와 같이 사용자 선택없이 Publish를 진행하고 싶을때 사용합니다.
    • --tag : Tag를 강제로 변경합니다. packages.yaml에 선언된 tag가 무시됩니다. (E2E Test와 같은 상황에 사용합니다)
    • --registry : 특정 Registry로 Publish 합니다. .npmrc의 Registry 선언이 무시됩니다. (E2E Test와 같은 상황에 사용합니다)

Directory Rules

아래와 같이 src/ 내의 파일들은 dist/로 빌드 됩니다.

dist/
  package1/
    index.js
    package.json
  @group/
    package2/
      dir/
        file.js
      index.js
      package.json
src/
  package1/
    index.ts
  @group/
    package2/
      dir/
        file.ts
      index.ts
package.json
trism.entry.yaml
tsconfig.json

위와 같은 경우 .trism.entry.yaml에는 아래와 같이 적혀있어야 합니다.

package1:
  version: 0.0.1
'@group/package2':
  version: 0.0.1

새로운 Package를 추가하고 싶은 경우 src/{name} 또는 src/@{group}/{name} 형식의 디렉토리를 만들고, .trism.entry.yaml에 추가해줍니다.

Package Group을 같은 정보로 입력하기

src/
  @group/
    package1/
      index.ts
    package2/
      index.ts
    package3/
      index.ts

위와 같은 Package Group이 있을 경우

'@group/*':
  version: 0.0.1

이와 같이 같이 선언할 수 있습니다.

.trism.package.json

모든 package.json에 공통적으로 적용되어야 하는 항목들이 있는 경우 .trism.package.json 파일을 만듭니다.

author, license, repository, publishConfig 같은 항목들을 입력하는데 사용합니다. (dependencies와 같은 항목들은 무시됩니다)

{
  "repository": "github:react-zeroconfig/react-zeroconfig",
  "bugs": "https://github.com/react-zeroconfig/react-zeroconfig/issues",
  "homepage": "https://github.com/react-zeroconfig/react-zeroconfig/tree/master/src/{name}"
}

위와 같이 {name} 또는 {version}을 사용할 수 있습니다.

src/{package}/.package.json.ts

package.json 파일을 직접적으로 제어해야 하는 경우 아래와 같이 src/{package}/.package.json.ts 파일을 만들어서 package.json 파일 생성에 직접 개입할 수 있습니다.

import { PackageJson, PackageJsonFactoryFunction } from 'trism';

export default ((computedPackageJson: PackageJson) => {
  return {
    ...computedPackageJson,
    dependencies: {
      ...computedPackageJson.dependencies,
      'some-dependency': '1.x',
    }
  }
}) as PackageJsonFactoryFunction;

computedPackageJson은 기본적으로 require(), require.resolve(), import '' 구문을 분석해서 dependencies를 자동으로 입력하는데, 해당 분석으로는 입력할 수 없는 항목들을 입력할 필요가 있는 경우를 비롯해서 package.json 생성에 직접적으로 개입해야 하는 경우 사용할 수 있습니다.