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

@mypaas/mp-cli

v1.0.15

Published

devtools

Downloads

16

Readme

Devtools

开发工具。

安装

# 使用 npm 全局安装 CLI
$ npm install -g @mypaas/mp-cli
# OR 使用 yarn 全局安装 CLI
$ yarn global add @mypaas/mp-cli

命令

| 命令 | 说明 | |------------------------|----------------------| | mp-cli init | 初始化项目 | | mp-cli create <name> | 创建组件, name 为组件名 | | mp-cli start | 启动项目 | | mp-cli help | 查看命名 | | mp-cli -v | 查看当前开发工具版本 |

功能

开启小程序调试

此功能需要升级开发工具至 v1.0.14 以上版本方可使用,在终端运行 mp-cli -v 可查看当前全局安装的版本。

  1. 在根目录下的 app.config.js 文件中添加如下代码:
const path = require('path')

module.exports = {
    app: {
        mpPedestal: {
            root: path.join(__dirname, 'temp', 'wechat'),
            run: true,
        },
    }
}

API

| 属性 | 说明 | |-----------------------------|--------------------------------------------| | app.mpPedestal | 开发工具小程序底座配置对象 | | app.mpPedestal.root | 底座存放目录,建议放在项目的 temp 目录下 | | app.mpPedestal.run | 是否启动小程序端调试(start 命令) | | app.mpPedestal.url | 自定义小程序底座地址(.tar.gz) |

  1. 运行 mp-cli init 命令,初始化小程序底座

执行完成后,会看到在 app.mpPedestal.root 配置项对应的目录下载了一个基础的 taro2 项目,这就是我们的小程序底座了(可以通过配置 url 字段自定义小程序底座地址)。

  1. 运行 mp-cli start,会执行一系列的脚本,让第2步中的 taro 项目可以直接运行起来,这样我们就可以同时在 h5 和小程序端预览效果,并实现双端热更新了。

Tips

  • 在浏览器设计器中操作数据后可以点击右上角的保存按钮,小程序端就会实时更新哦~