0.3.8 • Published 7 months ago

fdevtools v0.3.8

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

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

0.3.0

7 months ago

0.2.0

8 months ago

0.3.6

7 months ago

0.3.5

7 months ago

0.3.8

7 months ago

0.3.7

7 months ago

0.3.2

7 months ago

0.3.1

7 months ago

0.1.3

8 months ago

0.3.4

7 months ago

0.3.3

7 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago