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

rui-rkit

v1.4.6

Published

tools for tf team

Downloads

7

Readme

rui-rkit

rui-rkit 是一个基于 Webpack 的打包工具,它利用插件机制封装了各种 JavaScript 应用的配置,选择和安装合适的插件即可开始构建你的应用。

安装

  • latest 稳定版: [sudo] npm install rui-rkit -g

node.js 版本

  • node >=8

快速开始

  1. 创建目录 mkdir rkit-app && cd rkit-app
  2. 初始化工程 rui-rkit init 选择模版
  3. 安装依赖 npm install
  4. 启动服务 npm run dev 初始化结束后,项目中会生成一个名为 rkit.config.js 的配置文件:

hooks

新增 hooks 配置

hooks:{
  brefore: (config) => {},  //编译前钩子
  after: (config) => {} //编译后钩子
}

支持国际化打包

domainList: [{
  domain: `/[/test.xxx.comn`, //域名
  path: 'en', //目录
  isBuild: true // 是否编译
}]
// 生成目录为dist/en/xxxx(版本号)
// 注意:如何domainList存在isBuild为true的选项时会覆盖publicPath打包结果

支持强制 DIFF 流程

  • 请在 rkit.config.js 中配置,例如: projectName: 'easyLoan'
  • 分支生成的 DIFF,必须在 codereview 平台被他人通过才能进行 npm run build
  • npm run build
    • 选择分支可以指定分支 md5 作为版本号
    • 选择部署环境,bate 为线下环境,production 为线上环境

注:老版本中,原有的build/prod.env.js已经废弃,更新 1.2.7 后即可删除

支持同步静态文件

  • 请在 rkit.config.js 中配置,例如: syncHost: '10.1.1.1'
  • 运行rui-rkit sync,将会上传到配置的syncHost该主机内,并在控制台返回存储路径

支持同步 SourceMap 到 Sentry

运行 rui-rkit sync --sentry将上传并发布 sentry 版本,发布版本为最近一次 npm run build 的版本和环境变量,写入在.sentryVariable 中

在项目中引入 Sentry SDK 可以使用以下环境变量作为标识:

  • process.env.VUE_APP_DEPLOY_ENV :部署环境
  • process.env.VUE_APP_DEPLOY_VESION :当前项目版本号

注:npm run build 将会自动生成.sentryVariable用于存储版本信息,请加入到*.gitignore*中避免上传到 git 仓库

.sentryVariable

rui-rkit build 支持手动传入 branch、envs 字段

  • 运行 rui-rkit build --branch [分支名] --envs [beta/online]

配置文件选项 参考

https://cli.vuejs.org/zh/config/#%E5%85%A8%E5%B1%80-cli-%E9%85%8D%E7%BD%AE

命令 rui-rkit help

  • init - 初始化项目
  • serve - 启动服务
  • build - 生产环节编译
  • inspect - 生存 webpack 配置
  • lint - 检测代码
  • sync - 上传静态文件和 sourcemap

change log

1.修复 staticPath 文件缺少冒号问题
2.新增 hooks 配置 3.config 文件生成样式文件顺序错乱的问题,新增 pc 模版 4.新增强制 codereview 流程 5.新增上传静态文件到远程主机 6.删除上传 soucemap 到 sentry 服务 7.rui-rkit build 流程新增非必传字段[--branch] 、[--envs] 8.rui-rkit build 命令的传参[--mode],新增 mode 类型为[test], 用于线下联调、提测环境打包,区分线上, 上线时打包可以不传或者传[production]

线下联调、提测使用:
    rui-rkit build --mode test

上线使用:
    rui-rkit build
    rui-rkit build --mode production

9.domainList 配置项修改,新增 businessType 配置,上传不同的仓库 10.支持传入 md5 版本号,直接构建生成该版本号的包文件

命令:rui-rkit [--md5] [--branch] [--envs]
示例:rui-rkit --md5=1bf7979d844af11509554fef7cefdb95 --branch=20230516_test --envs=online
说明:上面的示例是使用分支为20230516_test的代码生成md5版本号为1bf7979d844af11509554fef7cefdb95的包文件