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

cra-template-level

v0.3.4

Published

cra-template-level template for react, typescript, mobx, material-ui, sass

Downloads

4

Readme

cra-template-level

Usage

  • npx create-react-app [project-name] --template level

  • git repository https://github.com/w-lianfu/cra-template-level.git

  • You can publish this for your own cra-template-*

    • npm login
    • npm publish --access public
  • npm link

    • https://www.npmjs.com/package/husky
  • submodule address

    • https://github.com/react-level/level-base.git

qiankun

qiankun main config

  • qiankun project demo
    • https://github.com/qiankun-react
  • default support as qiankun sub app

registerMicroApps(
  [
    {
      name: 'sub1',
      entry: '//localhost:5001',
      container: '#sub1',
      activeRule: '/sub1',
    },
    {
      name: 'sub2',
      entry: '//localhost:5004',
      container: '#sub2',
      activeRule: '/sub2',
    },
  ],
  {
    beforeLoad: [
      // @ts-ignore
      app => {
        console.log('Before load -- ', app);
      },
    ],
    beforeMount: [
      // @ts-ignore
      app => {
        console.log('Before mount -- ', app);
      },
    ],
    afterMount: [
      // @ts-ignore
      app => {
        console.log('After mount -- ', app);
      },
    ],
    beforeUnmount: [
      // @ts-ignore
      app => {
        console.log('Before unmount -- ', app);
      },
    ],
    afterUnmount: [
      // @ts-ignore
      app => {
        console.log('After unmount -- ', app);
      },
    ],
  },
);

setDefaultMountApp('/home');

start();

qian-sub config


/** qiankun lifecycle */

// bootstarp
const bootstrap = async () => {
  console.log('salary-web-home ~~~ bootstraped ~~~');
};

// mount
const mount = async (props: any) => {
  console.log('salary-web-home ~~~ mount ~~~');
  const container = document.getElementById('root');
  // @ts-ignore
  const root = ReactDOM.createRoot(container);
  root.render(<AppRoot />);
};

// unmount
const unmount = async (props: any) => {
  console.log('salary-web-home ~~~ unmount ~~~ ', props);
  ReactDOM.unmountComponentAtNode(props.container);
};

// update
const update = async (props: any) => {
  console.log('salary-web-home ~~~ update ~~~ props', props);
};

export {
  bootstrap,
  mount,
  unmount,
  update,
};

git commit 提交规范

约定式提交: https://www.conventionalcommits.org/zh-hans/v1.0.0-beta.4/

  • feat: 新增功能/完成任务 (feature)
  • fix: 修复bug
  • test: 单元测试
  • docs: 文档 (documentation)
  • style: 样式
  • refactor: 代码重构
  • pref: 优化相关,比如提升性能/体验
  • ci: CI/CD相关
  • chore: 辅助/其它
  • revert: 恢复变更/回滚到上一个版本
  • little: 微不足道的变更
  • try: 尝试

scope:

  • #task: 完成的任务加任务编号
  • #bug: 修复的bug加bug号
  • #test: 单元测试加任务编号
  • self-test: 自测
  • sub-**: 变更了sub模块的**功能
  • !: 包含破环性变更

重点

  • Bug 修复了bug的,带bug号,例: fix(#11): 修复样式bug
  • Feat 完成了任务/新增了功能的,带任务编号,例: feat(#12): 完成任务-添加视频宣传
  • Test 完成了单元测试功能的,加任务编号,例: test(#13): 登录模块增加单元测试
  • Log 通过 git log 查看:
    • git log --grep=feat
    • git log --grep fix
  • ! 会触发 MAJOR 版本的变更
  • feat 会触发 MINOR 版本的变更
  • fix 会触发 PATCH 版本的变更