20% OFF for the next 8 days with code UPVTD20
This widget lets you inlcude the Upvoted feature requests in any website. Upvoted.
To get started, follow these steps:
npm install
or pnpm install
depending on your preferred package manager. npm run dev
or pnpm dev
. http://localhost:5173
to see the widget in action. The project is structured as follows:
.
├── dist/ # Output directory for the widget
├── public/ # Public assets for the widget
├── src/ # Source code for the widget
│ ├── App.css # CSS file for the development Vite app
│ ├── App.tsx # Entry point for the development Vite app
│ ├── widget/ # Source code for the widget
│ │ ├── components/ # Components for the widget
│ │ ├── lib/ # Utility functions for the widget
│ │ ├── index.tsx # Entry point for the widget
│ │ └── styles/ # CSS styles for the widget
src/widget
directory. src
directory. Useful for development and testing your widget in a Vite app. dist
directory. public
directory. To clone the repository, you can use the following command:
git clone https://github.com/releasysaas/upvoted-embeddable-widget.git
To install the dependencies, you can use the following commands:
npm install
or
pnpm install
To run the development server, you can use the following command:
npm run dev
or
pnpm dev
Once the development server is running, you can open your browser and navigate to http://localhost:5173
to see the widget in action.
To bundle the widget, you can use the following command:
npm run build:widget
or
pnpm build:widget
This will create a dist
directory with the bundled widget files.
For running the widget in production mode, you can use the following command:
npm run build:widget:production
or
pnpm build:widget:production
Production mode will use the environment variables from the .env.production
file.
To test the bundled widget, you can use the following command:
npm run serve
or
pnpm serve
This will start a local server and serve the widget at http://localhost:33333/index.html
.
Then in an other shell run:
npm run serve:widget
or
pnpm serve:widget
Load the widget on your page:
<script
src="https://cdn.jsdelivr.net/gh/releasysaas/upvoted-embeddable-widget@1.0.0/dist/widget.js"
defer
data-client-key="019483fc-b33e-7456-a5df-5bfa9ede6429"
></script>
replace the data-client-key
value with the API token generated from the Upvoted backoffice.
git tag 2.0.0
update the version in the readme
update the version in test/index.html
update the version in .env.production
build the widget
npm run build:widget:production
git push origin --tags
We welcome contributions to this project. If you find a bug or have a suggestion for improvement, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.
Releasy CORP, We Build SaaS and Productivity Tools!