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

react-antd-ssr-spa

v1.0.0

Published

使用修改点:

Downloads

29

Readme

注意

使用修改点:

  • windows 下配置 autocrlf 为 false
    git config --global core.autocrlf false

    否则会自动把换行符 LF(linefeed character) 转换成回车符 CRLF(carriage-return character)

  • constant/index.ts

    采用 cookie 存储 token 到上级域名,在这个文件中修改 cookie key 及登录页面的 url

  • constant/systemInfo.ts

    页面常量在此处修改,比如系统名称、著作权等等

  • 开启 rem 需要放开注释

    webpack/module-rules.js 的 pix2rem webpack/index.html 中 rem 的 script 节点 server/config.ts 中的 useRem

已完成

  • [x] 集成 antd
  • [x] husky、quick prettie、commitlint 验证提交
  • [x] utils 工具类封装
  • [x] 基础布局封装

    左侧菜单布局、顶部菜单布局、注册/登录布局

  • [x] 权限控制
  • [x] 集成 ant design pro table
  • [x] thyReq 允许自定义 axios 回调
  • [ ] stylus、vue 支持

    等 vue3 release 再考虑,到时候再集成一个默认的 vue ui

  • [ ] fluent ui

    看着风格挺好的,接口设计也挺好的,还 css in js,奈何组件太弱了,需要自行完善很多:

    • [x] toast 静态调用(基于 MessageBar 封装)
    • [ ] alert、confirm 静态调用(基于 Modal 封装)
    • [ ] 表格:分页组件(无)、过滤搜索区域()
    • [ ] 表单:form 组件(无)、form 自动验证(无)
    • [ ] 默认没有栅格栏,需要导入 Fabric Core
    • [ ] 重写 login 页面
    • [ ] 重写 leftMenuLayout
    • [ ] 重写 topMenuLayout

提交规范

'build', // 构建
'ci', // ci
'chore', // Other changes that don't modify src or test files. 改变构建流程、或者增加依赖库、工具等
'docs', // Adds or alters documentation. 仅仅修改了文档,比如README, CHANGELOG, CONTRIBUTE等等
'feat', // Adds a new feature. 新增feature
'fix', // Solves a bug. 修复bug
'perf', // Improves performance. 优化相关,比如提升性能、体验
'refactor', // Rewrites code without feature, performance or bug changes. 代码重构,没有加新功能或者修复bug
'revert', // Reverts a previous commit. 回滚到上一个版本
'style', // Improves formatting, white-space. 仅仅修改了空格、格式缩进、逗号等等,不改变代码逻辑
'test' // Adds or modifies tests. 测试用例,包括单元测试、集成测试等

ssr

  • [x] server 端获取页面初始数据
  • [x] 注入初始 store 数据
  • [x] server 端有修改时,如何自动刷新页面 除非开发时 socket 通知,但仅仅为了自动刷新,没必要
  • [x] 使用 nodemon,有时候端口不会被释放 已改为 spawn+kill('SIGINT') 的方式

预览

login home