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

matman-cli

v6.0.20

Published

CLI for matman projects

Downloads

29

Readme

matman-cli

matman 项目的 CLI 工具,更多资料请参考: matman 官方文档

1. 安装

全局安装(Linux/MacOS 等系统下可能需要使用 sudo):

$ npm install matman-cli -g

特别注意:全局安装 matman-cli 时,可能会提示 electron 权限安装问题。此时需要增加一些额外参数来安装:

$ sudo npm install matman-cli -g --unsafe-perm=true --allow-root

2. 用法说明

2.1 matman.config.js

每个需要构建爬虫脚本的 matman 项目的根目录下必须要 matman.config.js 文件,就像每个需要 webpack 构建的项目得有 webpack.config.js 一样。

2.2 参数选项

  • --help,打印帮助
  • --version,打印版本号

2.3 命令

2.3.1 matman build [options]

执行构建命令。

options 支持两个:

  • dev: 是否为开发者模式,使用方式: --dev
  • config: 自定义配置文件,使用方式: --config=matman.config.js

构建过程主要处理以下事情:

  • 利用 webpack 分析依赖,将前端爬虫脚本打包成一个文件
  • 注入 nightmare 的特定代码以便完成通信
  • 注入 jQuery 等脚本,方便调用