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

ts-depot-master

v0.0.1

Published

在每个 package 中执行任意命令,用波折号(`--`)分割命令语句

Downloads

3

Readme

lerna 包管理器:

lerna的作用是,把多个项目或者模块拆分为多个packages放入一个git仓库进行管理。

  • 通过命令lerna boostrap自动解决packages之间的依赖关系,对于packages内部的依赖会直接采用symlink的方式关联过去。
  • 通过命令lerna publish依赖git检测文件改动,自动发布,管理版本号。
  • 根据git 提交记录,自动生成changelog

查找工程下面的包:npx lerna list

lerna add // 所有子包都添加这个依赖 lerna add --scope = // 给scope后的包添加依赖

运行包的 script 命令:

lerna exec

在每个 package 中执行任意命令,用波折号(--)分割命令语句

使用方式

$ lerna exec -- <command> [..args] # runs the command in all packages
$ lerna exec -- rm -rf ./node_modules
$ lerna exec -- protractor conf.js

可以通过LERNA_PACKAGE_NAME变量获取当前 package 名称:

$ lerna exec -- npm view \$LERNA_PACKAGE_NAME

也可以通过LERNA_ROOT_PATH获取根目录绝对路径:

$ lerna exec -- node \$LERNA_ROOT_PATH/scripts/some-script.js

Command Options

所有的过滤选项都支持

$ lerna exec --scope my-component -- ls -la
  • --concurrenty

使用给定的数量进行并发执行(除非指定了 --parallel)。 输出是经过管道过滤,存在不确定性。 如果你希望命令一个接着一个执行,可以使用如下方式:

$ lerna exec --concurrency 1 -- ls -la

启用 yarn Workspaces (强烈建议)

Workspaces can only be enabled in private projects.

默认是 npm, 每个子 package 下都有自己的 node_modules,通过这样设置后,会把所有的依赖提升到顶层的 node_modules 中,并且在 node_modules 中链接本地的 package,便于调试

注意:必须是 private 项目才可以开启 workspaces

ts-depot 依赖 rollup-plugin-removeconsole

步骤二: 添加第三方依赖包"chalk"到 ts-depot 的开发依赖库中,执行如下命令:

npx lerna add chalk --scope=ts-depot --dev

步骤三 添加本地包 rollup-plugin-removeconsole 到 ts-depot 的依赖库中,执行如下命令:

npx lerna add rollup-plugin-removeconsole --scope= ts-depot

步骤四 在 packages/feu-ui/lib/ui.js 添加代码如下:

const chalk = require('chalk'); const { add } = require('feu-tools');

发布 npm:::::::::::::::::::::::::::::: npm login

更新 "version": "0.0.2",

npm publish