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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@qlover/corekit-bridge

v1.10.0

Published

fe-corekit Abstraction tool bridge for real development environments

Readme

@qlover/corekit-bridge

fe-corekit 实际开发环境的抽象工具桥接

简介

@qlover/corekit-bridge 是一个用于连接 fe-corekit 核心工具和实际开发环境的桥接库。它提供了一系列实用工具和插件,简化了前端应用程序的开发流程。

安装

npm install @qlover/corekit-bridge

或者

yarn add @qlover/corekit-bridge

主要功能

Bootstrap 引导系统

用于应用程序初始化和依赖注入的引导系统:

import {
  Bootstrap,
  InjectIOC,
  InjectEnv,
  InjectGlobal
} from '@qlover/corekit-bridge';

const bootstrap = new Bootstrap(window, iocContainer, logger);

bootstrap
  .use(new InjectIOC(iocManager, registers))
  .use(new InjectEnv(config, process.env, 'APP_'))
  .use(new InjectGlobal(globals, 'AppGlobals'))
  .start();

IOC 容器接口

提供依赖注入容器的标准接口:

import { IOCContainerInterface } from '@qlover/corekit-bridge';

class MyContainer implements IOCContainerInterface {
  // 实现接口方法
}

API 请求插件

一系列增强 API 请求功能的插件:

  • ApiCatchPlugin: 捕获 API 请求错误
  • ApiMockPlugin: 提供 API 模拟数据功能
  • ApiPickDataPlugin: 从响应中提取数据
  • RequestCommonPlugin: 处理通用请求配置
import { ApiMockPlugin, ApiCatchPlugin } from '@qlover/corekit-bridge';

const mockPlugin = new ApiMockPlugin(mockData, logger);
const catchPlugin = new ApiCatchPlugin(logger, errorCatcher);

构建工具

提供一系列有用的构建和配置工具:

Tailwind 10px 根字体配置

import tailwindRoot10px from '@qlover/corekit-bridge/tw-root10px';

// 在 tailwind.config.js 中使用
module.exports = {
  theme: {
    ...tailwindRoot10px.themes
  },
  plugins: [tailwindRoot10px.plugin]
};

Vite 环境配置插件

import viteEnvConfig from '@qlover/corekit-bridge/vite-env-config';

// 在 vite.config.js 中使用
export default {
  plugins: [
    viteEnvConfig({
      envPrefix: 'APP_',
      records: [
        ['APP_NAME', 'appName'],
        ['APP_VERSION', 'appVersion']
      ]
    })
  ]
};

TypeScript 到本地化文件转换工具

import viteTs2Locales from '@qlover/corekit-bridge/vite-ts-to-locales';

// 在 vite.config.js 中使用
export default {
  plugins: [
    viteTs2Locales({
      locales: ['en', 'zh'],
      options: [
        {
          source: './config/ErrorIdentifier.ts',
          target: './locales/{{lng}}/common.json'
        }
      ]
    })
  ]
};

彩色日志 ColorLogger

提供带颜色的控制台日志输出:

import { Logger, ColorFormatter } from '@qlover/corekit-bridge';

const logger = new Logger({
  level: 'debug',
  handlers: new ColorFormatter();
});

logger.debug('调试信息');
logger.info('普通信息');

其他工具

  • 线程工具 (ThreadUtil)
  • 存储令牌服务 (StorageTokenService)
  • 主题服务 (ThemeService)

许可证

ISC