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 🙏

© 2026 – Pkg Stats / Ryan Hefner

weapp-migrate

v1.1.3

Published

营销小程序迁移工具

Readme

weapp-migrate

营销小程序迁移工具

下载

推荐全局下载

npm i -g weapp-migrate

使用

假设目录结构如下

|-- 1015-project
  |-- marketing-campaign-applet
  |-- marketing-code

使用方法一:(推荐使用方式)

  1. scripts 中配置对应命令,注意-sp-dp 后的路径可以是相对路径也可以是绝对路径,建议使用相对路径
  //marketing-campaign-applet/package.json
  "scripts": {
    "build:sc": "npm run build:prod && weapp-migrate -sp ../marketing-code -dp ../marketing-campaign-applet",
  },
  1. 执行配置的命令
npm run build:sc

使用方法二:

  1. 进入1015-project这个目录
cd 1015-project
  1. 执行下面的命令即可
weapp-migrate -sp ./marketing-code -dp ./marketing-campaign-applet

命令参数

  • srcPath,需要复制的源位置,必填项
  • destPath,将被复制的目标位置,必填项
  • copyFiles,需要复制的文件,非必填,有默认值
  • copyPages,需要复制的页面,非必填,有默认值
  • writeRoutes,需要写入的路由,非必填,有默认值
  • writeSubPages,需要写入的路由,非必填,有默认值

使用--help,查看帮助信息

$ weapp-migrate --help

Usage: weapp-migrate [options]

Options:
  -sp, --srcPath <path>           需要复制的源位置
  -dp, --destPath <path>          将被复制的目标位置
  -cf, --copyFiles [files...]     需要复制的文件 (default: ["api","assets","config","request","utils"])
  -cp, --copyPages [pages...]     需要复制的页面 (default: ["group-code","qr-code","redirect-to-h5"])
  -wr, --writeRoutes [routes...]  需要写入的路由 (default:["pages/group-code/index","pages/group-code/other-result/index","pages/qr-code/index","pages/redirect-to-h5/index"])
  -wsp, --writeSubPages [subPages...]  需要写入分包 (default: ["pages/area-code:index, select-city/index"])