New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

fdevtools

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fdevtools

A dev-tools context menu in your react or nextJS app

latest
Source
npmnpm
Version
0.3.8
Version published
Maintainers
0
Created
Source

FDevTools

Mini dev-tools in a context menu within your React UI

Installation

Install my-project with npm

  npm i fdevtools

Import fdevtools and styles

  import FDevTools from "fdevtools";
  import "fdevtools/dist/styles.css"

If you want the code modifying feature add this to your "start dev server" script

Vite

"dev": "node node_modules/fdevtools/dist/codeMonger/index.cjs & vite",

NextJS

"dev": "node node_modules/fdevtools/dist/codeMonger/index.cjs & next dev",

This will start a local node server that will modify the code in your project when requested

If you don't want the code modifying feature set the disableCodemonger prop to true

    <FDevTools disableCodemonger={true}>
      <App />
    </FDevTools>

Add FDevTools to you React or NextJS project

  createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <FDevTools>
      <App />
    </FDevTools>
  </StrictMode>
);

The context menu should open when "control + right clicking" on any element

Tailwind

Tailwind won't load all classes when your dev server is started. To fix this you will need to update your tailwind.config.js file and add

  safelist: [
    { pattern: /.*/ }, // Include all tailwind classes
  ],

Making this modification will make your dev server first load slower since it has to load all existing Tailwind classes.

Screenshots

Hold ctrl key to highlight elements

App Screenshot

Ctrl + right click will open the context menu

Press the paper and pen icon next to "Classes" to edit them

App Screenshot

Adding classes into the input separated by space and pressing enter will add them to the selected element in the DOM. Existing or added classes can be deleted by just clicking on them.

Out of editing mode clicking on a class will copy it to the clipboard

App Screenshot

Keywords

devtools

FAQs

Package last updated on 08 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts