Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@weimob-cloud/matrix
Advanced tools
这是一个尝试将 微信小程序的组件或页面 转换成 React组件 的编译转换工具。 同时也支持带条件编译的小程序代码编译为小程序平台的代码和H5平台的React代码。
$ npm install @weimob-cloud/matrix --save
const wmatrix = require('@weimob-cloud/matrix')
wmatrix.build(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
option | 简写 | 含义 | 默认值/参数 | 可选值 |
---|---|---|---|---|
--root | -r | 项目根目录 | process.cwd() | - |
--target | -t | 编译目标平台 | all | all h5 xapp |
--entry | -e | 待编译的组件的相对路径 | ./wmxapp | - |
--outdirh5 | -oh | h5平台的编译输出路径 | ./web | - |
--outdirxapp | -ox | 小程序平台的编译输出路径 | ./xapp | - |
.npmrc
在vscode工具中配置launch.json
$ npm run build
注:打包后最好测试一下功能是否正常,因为开发用ESM,打包后是CommonJS,会有部分差异。
FAQs
Command line interface for convert miniprogram to react.
The npm package @weimob-cloud/matrix receives a total of 0 weekly downloads. As such, @weimob-cloud/matrix popularity was classified as not popular.
We found that @weimob-cloud/matrix demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.