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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ew-auto-import-tool

v0.0.1

Published

自动化完成Vue项目中按需导入组件库的配置工具

Readme

Auto Import Tool

NPM Version License

Introduction

The Auto Import Tool is a CLI utility that automatically configures on-demand imports for component libraries in Vue projects. It helps quickly set up popular component libraries like Element Plus, Ant Design Vue, etc., without manual configuration file modifications.

Features

  • Dependency Management: Automatically detects and installs required dependencies
  • Vite Configuration: Automatically adds necessary import statements and plugin configurations
  • TypeScript Support: Updates tsconfig.json file automatically
  • Declaration Files: Generates component and API declaration files

Installation

npm install -g ew-auto-import-tool

Or run directly using npx:

npx ew-auto-import-tool

Usage

Basic Usage

Run in Vue project root:

ew-auto-import-tool

The tool will guide you to select component libraries and complete configuration automatically.

CLI Options

ew-auto-import-tool --library element-plus

Available Options

  • -l, --library <library>: Specify component library (element-plus, ant-design-vue, naive-ui, vant)
  • -p, --path <path>: Specify project path (default: current directory)
  • -v, --version: Show version
  • -h, --help: Display help

Supported Libraries

Implementation

  1. Project Detection: Verifies Vue + Vite + TypeScript project setup
  2. Dependency Installation: Installs unplugin-auto-import, unplugin-vue-components and component libraries
  3. Configuration Update: Modifies vite.config.ts with auto-import plugins
  4. TypeScript Support: Updates tsconfig.json declaration file references
  5. File Generation: Creates components.d.ts and auto-imports.d.ts

Example

Before configuration:

<script setup lang="ts">
import { ElButton, ElInput } from "element-plus";
import "element-plus/es/components/button/style/css";
import "element-plus/es/components/input/style/css";
</script>

<template>
  <el-button>Button</el-button>
  <el-input placeholder="Input content" />
</template>

After configuration:

<script setup lang="ts">
// No manual imports needed
</script>

<template>
  <el-button>Button</el-button>
  <el-input placeholder="Input content" />
</template>

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT