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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lhsh-cli/monitor

v1.0.2

Published

- [课程地址](https://www.bilibili.com/video/BV1Fa411T7uY?p=8&spm_id_from=pageDriver&vd_source=331e677ebe8fb9f71371d84f2131be4f) - [源码地址](https://github.com/jayfront/tracker/blob/master/src/core/index.ts) - 在发布npm包之前, 需要在package.json中添加main, moudule, brows

Downloads

2

Readme

前端埋点SDK开发

  • 课程地址
  • 源码地址
  • 在发布npm包之前, 需要在package.json中添加main, moudule, browser字段, main表示正常引入的文件

构建Angular Lib的步骤

以下供参考

  • https://medium.com/@nikolasleblanc/building-an-angular-4-component-library-with-the-angular-cli-and-ng-packagr-53b2ade0701e (需要翻墙)
  • https://angular.cn/guide/creating-libraries
  1. 在任意空位置执行ng new xxx新建一个Angular项目.
  2. 执行npm install ng-packagr -D.
  3. 在生成好的Angular项目的src同级目录下新建一个projects文件夹.
  4. 在projects文件夹下执行ng generate library xxx(库的名字), 它会默认帮我们安装好ng-packager.json.
  5. 在库的src/lib目录下开发你的库.
  6. 开发完成后, 可以使用 CLI 命令来构建、测试和 lint 这个项目.
    • ng build my-lib
    • ng test my-lib
    • ng lint my-lib
  7. 执行 ng build之后会生成一个dist目录, 进入到这个dist目录然后执行 npm pack会在dist目录下生成一个my-component-library-0.0.0.tgz, 0.0.0是从package.json的version中同步过来的.
  8. 其他Anglar应用可以执行 npm install ../some_relative_path/dist/my-component-library-0.0.0.tgz来安装你的库.
  9. publish your library on npm.
  10. 发布到npm 上后, 其他Angular应用想要使用, 执行npm install xxx, 此处的xxx指的是projects目录下的package.json的name, 而不是整个项目下的package.json的name.