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

@isvrax/isv-rax-transformer

v0.0.7

Published

给ISV使用的Rax快速迁移工具

Downloads

2

Readme

ISV工程转换工具

转换使用流程

  1. 打开待处理的前端工程,由于本工具会对工程进行重构,请先确认工程代码提交状态,以确保可以随时找回代码
  2. 执行 npm i @isvrax/isv-rax-transformer 安装工具包
  3. 执行 isv-rax-transformer start,待迁移完成
  4. 执行 npm i ,安装前端工程依赖
  5. 执行 npm run start 验证与调试
  6. 如发现转换错误或有未转换的内容,请反馈给开发者

Q&A

Q:转换工具做了什么?

A:转换工具在执行 start 命名后:

  • 首先,会将原工程目录结构转换成 icejs v3 标准的目录结构;
  • 其次,根据原工程依赖等信息,生成新的依赖信息;
  • 然后,增加构建插件isv-plugin-rax-compat,一方面是用于rax向H5的打包,另一方面是注入运行时的兼容——isv-h5-adapter,对 rax 进行了转 react 的映射;
  • 最后,工具也对一些原工程中的代码进行了修改以兼容H5,同时置入了src/local-alias,以供开发者对原rap-sdk和weex方法进行兼容处理;

Q:转换后的H5是什么路由模式?

A:默认是遵循icejs的 pages 约定式路由模式(pathname路由),这区别于原工程的分页独立资源打包的方式。所以如果原来有模块级的逻辑,可能需要修改为页面实例级的逻辑,以保证执行时机的正确。

Q:转换后运行报错怎么办?

A:由于原 rax 工程是 0.x 版本,有一些语法、用法不兼容H5,转换工具无法确保都进行了兼容覆盖,这部分需要开发者根据报错内容,将代码按 ES6(如 export default )、local-alias( rap-skd api 调用)、接口调用规范等进行相应修正。

Q:新的H5工程完成后,如何上传?

A:工程中提供了构建压缩指令:npm run archive ,执行后会生成 package-YYYY-MM-DD-HH-mm-ss.zip 命名的压缩包,上传到开放平台即可。