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

@weimob-cloud/matrix

v0.1.0

Published

Command line interface for convert miniprogram to react.

Downloads

1

Readme

wm-cloud-matrix

wm-cloud-matrix 介绍

这是一个尝试将 微信小程序的组件或页面 转换成 React组件 的编译转换工具。 同时也支持带条件编译的小程序代码编译为小程序平台的代码和H5平台的React代码。

用户安装使用

有两种使用方式:

一、JS API

$ npm install @weimob-cloud/matrix --save
const wmatrix = require('@weimob-cloud/matrix')
wmatrix.build(options)
Options

| 字段 | 类型 | 含义 | 默认值/参数 | 可选值| | ---- | ---- | ---- | ---- | ---- | | root | String | 项目根目录 | process.cwd() | - | | target | String | 编译目标平台 | all | all h5 xapp | | entry | String/Array | 待编译的组件的相对路径| ./wmxapp | ./wmxapp 该目录下所有组件 \ ./wmxapp/comp1 ./wmxapp/comp2 指定单个组件或多个组件 | | outdirh5 | String | h5平台的编译输出路径 | ./web | - | | outdirxapp | String | 小程序平台的编译输出路径 | ./xapp | - | | done | Function | 编译完成后的回调函数 | f(成功组件,失败组件,耗时){} | - |

二、命令行工具

$ npm install -g @weimob-cloud/matrix

$ matrix -r /Users/xxx/.../myproject -e ./wmxapp/comp1 ./wmxapp/comp2 -oh ./web -ox ./xapp
or
$ matrix -e ./xapp
命令行参数的options:

| option | 简写 | 含义 | 默认值/参数 | 可选值| | ---- | ---- | ---- | ---- | ---- | | --root | -r | 项目根目录 | process.cwd() | - | | --target | -t | 编译目标平台 | all | all h5 xapp | | --entry | -e | 待编译的组件的相对路径| ./wmxapp | - | | --outdirh5 | -oh | h5平台的编译输出路径 | ./web | - | | --outdirxapp | -ox | 小程序平台的编译输出路径 | ./xapp | - |

开发者参与开发

环境准备

  1. node: "12.x || >=14.0.0"
  2. npm: 与node配套即可
  3. 包管理工具:npm,镜像源:微盟镜像源,已默认配置.npmrc

本地联调方法

在vscode工具中配置launch.json

编译打包

$ npm run build

注:打包后最好测试一下功能是否正常,因为开发用ESM,打包后是CommonJS,会有部分差异。