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

@line-copy-open/rollup

v0.3.1

Published

🚀 A rollup plugin for fast find source code.

Readme

@line-copy-open/rollup

NPM version MIT

A rollup plugin for fast find source code.

Home

Install

npm i @line-copy-open/rollup -D

Usage

// rollup.config.ts
import openEditor from '@line-copy-open/rollup';

export default defineConfig({
  plugins: [
    openEditor({
      clickAction: 'copy-tooltip',
      shortcutKey: 'right-command',
    }),
    // other plugins
  ],
});

Options

/**
 * 插件配置选项 | Plugin Configuration Options
 */
export interface Options {
  /**
   * 源代码根目录路径 | Source code root directory path
   * @default `process.cwd()`
   * @example
   * ```ts
   * rootDir: path.resolve(__dirname, 'src')
   * ```
   */
  rootDir?: string;

  /**
   * 在浏览器显示切换按钮 | Display toggle button in browser
   * @default `true`
   * @remarks
   * 控制是否在页面右下角显示调试开关 | Controls whether to show debug toggle at bottom-right corner
   */
  displayToggle?: boolean;

  /**
   * 禁用 CSS 悬停效果 | Disable CSS hover effects
   * @default `true`
   * @remarks
   * 当检查器启用时禁用元素悬停高亮 | Disable element highlighting on hover when inspector is active
   */
  disableHoverCSS?: boolean;

  /**
   * 忽略指定目录的组件 | Ignore components in specified directories
   * @default `\/**\/node_modules\/**\/*`
   * @see [Glob Pattern Syntax](https://en.wikipedia.org/wiki/Glob_(programming))
   * @remarks
   * 使用 glob 模式匹配需要忽略的路径 | Use glob patterns to match ignored paths
   */
  ignoreComponents?: string | string[];

  /**
   * 单次检查模式 | Single-inspection mode
   * @default `true`
   * @remarks
   * 执行点击动作、打开编辑器或组件树后自动退出检查状态 | Automatically exit inspection after running the click action, opening editor, or showing the component tree
   */
  once?: boolean;

  /**
   * 跨 iframe 交互支持 | Cross-iframe interaction
   * @default `true`
   * @remarks
   * 允许在子 iframe 中提升操作到父窗口(仅限同源)| Enable elevating operations from child iframes to parent window (same-origin only)
   */
  crossIframe?: boolean;

  /**
   * 单击元素时触发的动作 | Action triggered when clicking an element
   * @default `'copy-tooltip'`
   * @remarks
   * 可选值:`copy-tooltip`、`copy-location`、`open-editor`、`show-component-tree` | Supported values: `copy-tooltip`, `copy-location`, `open-editor`, `show-component-tree`
   */
  clickAction?: 'copy-tooltip' | 'copy-location' | 'open-editor' | 'show-component-tree';

  /**
   * 长按元素时触发的动作 | Action triggered when long-pressing an element
   * @default `'open-editor'`
   * @remarks
   * 可选值:`copy-tooltip`、`copy-location`、`open-editor`、`show-component-tree` | Supported values: `copy-tooltip`, `copy-location`, `open-editor`, `show-component-tree`
   */
  longPressAction?: 'copy-tooltip' | 'copy-location' | 'open-editor' | 'show-component-tree';

  /**
   * 启用检查器的快捷键 | Shortcut key used to enable inspector
   * @default `'right-command'`
   * @remarks
   * 可选值:`right-command`、`right-option` | Supported values: `right-command`, `right-option`
   */
  shortcutKey?: 'right-command' | 'right-option';

  /**
   * 显式指定用于打开文件的编辑器命令 | Explicit editor command
   * @example 'code'
   * @remarks
   * 传入后会优先于 launch-editor 的自动猜测逻辑 | Overrides launch-editor auto detection
   */
  editor?: string;

  /**
   * 服务端配置 | Server Configuration
   */
  server?: {
    /**
     * 自定义端口号 | Custom port
     */
    port?: number;

    /**
     * HTTPS 安全传输层配置 | HTTPS Secure Transport Layer Configuration
     * @see [TLS Context Options](https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions)
     * @example
     * {
     *   key: '/path/to/private.key',
     *   cert: '/path/to/certificate.pem'
     * }
     */
    https?: {
      /**
       * PEM 格式的 SSL 私钥文件路径 | Path to PEM formatted SSL private key file
       * @fileMustExist 文件必须存在且可读 | File must exist and be readable
       */
      key: string;

      /**
       * PEM 格式的 SSL 证书文件路径 | Path to PEM formatted SSL certificate file
       * @fileMustExist 文件必须存在且可读 | File must exist and be readable
       */
      cert: string;
    };
  };

  /**
   * 自定义编辑器打开处理器 | Custom editor opening handler
   * @default `launch-editor`
   * @remarks
   * 覆盖默认的文件打开逻辑 | Override default file opening behavior
   */
  onOpenEditor?(file: string, errorCallback: (errorMessage: string) => void): void;
}

Playgrounds

| Source code | Online trial | | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | rollup/react15 | Open in StackBlitz | | rollup/vue2 | Open in StackBlitz |