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

mdlife-cli

v1.0.1

Published

MDLife命令行工具

Downloads

9

Readme

mdlife-cli

一个MDLife开发的简单工具集合,目前暂只支持安卓真机同步和widget命令压缩

安装

先决条件:Node.js (>= 12.x) 代码中使用的ES2018的await/async语法,需要最新版本的Node.js支持

$ npm install --save-dev mdlife-cli

使用

1. 查看使用帮助

查看整个命令的使用帮助

$ npx mdlife -h

查看具体操作命令的使用帮助

$ npx mdlife android -h # 安卓升级
$ npx mdlife package -h # 压缩widget命令使用帮助

2. 安卓真机同步

基本方法(使用项目下dict目录为源代码目录进行真机同步测试)

$ npx mdlife android

指定源代码目录

$ npx mdlife android -s mdlife-demo

仅重连日志(用于USB线断开、调整logcat参数等情况)

$ npx mdlife android -l

3. 压缩Widget包

基本方法(使用项目下dict目录为源代码目录压缩Widget包)

$ npx mdlife package

指定源代码目录

$ npx mdlife android -s mdlife-demo

4. 配置参数

  1. -s, --src 操作源文件目录,默认为当前路径下的dict目录
  2. -l, --log 仅与android命令结合使用,不同步代码,仅重连日志
  3. -h, --help 输出命令行帮助使用手册,如果指定cmd参数,查看指定命令的使用说明

配置文件

.mdliferc

在项目根目录下添加.mdliferc文件,对mdlife命令行工具进行配置,有以下配置

{
    "adb": "", // 安卓真机同步使用的adb工具路径,win32平台有自带adb工具,其他系统需要手工设置
    "mainActivity": "", // 安卓MDLoader启动主类,默认为com.yinhai.hybird.md.engine.ui.SplashActivity,一般不需要修改
    "logcat": [] // 安卓真机同步时logcat命令参数,默认只取MDLIFE_Debuger的日志
}

package.json

可以在项目package.json中增加mdlife配置项,内容和.mdliferc相同

{
    "mdlife": {}
}

其他

1. 打包和同步时忽略文件

  1. 所有以"."开头的文件和目录(隐藏文件)
  2. 所有以".log"结尾的文件和目录(日志文件)
  3. CustomLoader 目录(自定义loader)

2. 需要提供自定义Loader

工具未提供默认的自定义load实现,项目需要提供自定义loader实现