Skip to content

This is a development tool that supports one-click navigation from web components to the source code and supports both React and Vue.

Notifications You must be signed in to change notification settings

midori-profile/sourcecode-seeker

Repository files navigation

GraphQL Easy Mock

Code Seek is a frontend development tool that allows you to locate your component's source code with a single click from the browser. It currently supports React, and will support Vue soon.

Installation

The plugin has not been published to the application market yet. You can import the dist package from the root directory of this repository into your Chrome extension.

Follow these steps:

  1. Click on the Chrome plugin button and then click on "Manage extensions".

Manage Extensions

  1. Click "Enable developer mode" in the top right corner.

Enable Developer Mode

  1. Click "Load unpacked".

Load Unpacked

  1. Import the dist package from the root directory of this repository.

Import Dist Package

  1. The plugin has been successfully installed in your Chrome browser.

Plugin Installed

How to Use

Babel configuration reference: .babelrc

This configuration allows you to use the latest JS, JSX, and TS features:

{
  "presets": [
    ["@babel/preset-env", { "targets": "defaults" }],
    ["@babel/preset-react", { "development": true }],
    "@babel/preset-typescript"
  ]
}

In your Webpack configuration, the devtool: "source-map" option enables Webpack to generate source maps. Refer to this file: webpack.config.js.

Then, enable the Source Code Seeker:

Enable Source Code Seeker

Open the Inspector (this step is crucial):

Open Inspector

Option/Alt-click the component you want to locate:

Option/Alt-click Component

You will be directed to the source code:

Locate Source Code

Exploring

I have provided an example for you to experience the plugin's features:

cd example/react
pnpm install
pnpm start

Planned Features

  1. Vue Support: Currently under development and will be added soon.

About

This is a development tool that supports one-click navigation from web components to the source code and supports both React and Vue.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published