0.0.16 • Published 6 months ago

@dedevs/docs-widget v0.0.16

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

docs-widget

Chat with your docs using our customizable widget.

A simple React component that displays 'Hello World'. This package is intended as a basic example of how to create and publish a React component to npm.

Installation

To install this component, you can use pnpm (etc.):

pnpm install @dedevs/docs-widget

Usage

Once installed, you can import and use the DocsWidget component in your React application:

import React from "react";
import DocsWidget from "@dedevs/docs-widget";

function App() {
  return (
    <div>
      <h1>My Application</h1>
      <DocsWidget />
    </div>
  );
}

export default App;

Development and Testing Locally

To test this component locally before publishing:

  1. Navigate to the component's directory:

    cd path/to/docs-widget

    (For your setup, this would be cd /Users/buns/Documents/GitHub/DeDevsClub/docs-widget)

  2. Link the package locally: This command creates a global symbolic link for your package.

    pnpm link
  3. Create a new React test application (if you don't have one): Use Create React App or your preferred setup. Navigate outside the component's directory first.

    cd ..
    npx create-react-app my-test-app
    cd my-test-app
  4. Link the component to your test application: This command links the globally linked package to your test application's node_modules.

    pnpm link @dedevs/docs-widget
  5. Use the component in your test application: Modify src/App.js in my-test-app as shown in the Usage section above.

  6. Run the test application:

    pnpm start

    This should open your browser and display the 'Docs Widget' component.

Contributing

Feel free to open issues or submit pull requests. For major changes, please open an issue first to discuss what you would like to change.

License

MIT