{"id":18487033,"url":"https://github.com/seriousben/embeddable-react-widget","last_synced_at":"2025-04-06T02:12:51.803Z","repository":{"id":140047792,"uuid":"134987154","full_name":"seriousben/embeddable-react-widget","owner":"seriousben","description":"Create an embbedable js widget with react","archived":false,"fork":false,"pushed_at":"2023-07-31T13:58:23.000Z","size":26089,"stargazers_count":315,"open_issues_count":6,"forks_count":64,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-30T01:12:15.786Z","etag":null,"topics":["babel","embeddable","embeddable-widgets","react","webpack","widget"],"latest_commit_sha":null,"homepage":"https://seriousben.github.io/embeddable-react-widget","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seriousben.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-05-26T18:54:02.000Z","updated_at":"2025-03-07T07:21:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"c05ff8ca-b75f-48ec-8827-aa770231fd66","html_url":"https://github.com/seriousben/embeddable-react-widget","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seriousben%2Fembeddable-react-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seriousben%2Fembeddable-react-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seriousben%2Fembeddable-react-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seriousben%2Fembeddable-react-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seriousben","download_url":"https://codeload.github.com/seriousben/embeddable-react-widget/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423518,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","embeddable","embeddable-widgets","react","webpack","widget"],"created_at":"2024-11-06T12:50:06.450Z","updated_at":"2025-04-06T02:12:51.765Z","avatar_url":"https://github.com/seriousben.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003eEmbeddable React Widget\u003c/h1\u003e\n\nEasy creation of embeddable widgets - https://seriousben.github.io/embeddable-react-widget\n\n[![CircleCI](https://circleci.com/gh/seriousben/embeddable-react-widget.svg?style=shield)](https://circleci.com/gh/seriousben/embeddable-react-widget)\n[![codecov](https://codecov.io/gh/seriousben/embeddable-react-widget/branch/master/graph/badge.svg)](https://codecov.io/gh/seriousben/embeddable-react-widget)\n[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)\n\n\u003c/div\u003e\n\n## Features\n\n* Full ES6/ES2015 support (with Babel)\n* Package fonts, css, json, javascripts together into one single package (with Webpack)\n* No css styling conflicts between the host page and the widget (with https://github.com/premasagar/cleanslate)\n* Bookmarklet supported for fast testing and demonstration\n* User theming of widget\n* Obfuscating of the widget code\n* Unit Tested with code coverage enabled\n* Continuous Integration ready\n\n## Demo\n\n\u003cimg width=\"600px\" src=\"./bookmarklet-flow.gif\" /\u003e\n\n## Running the widget\n\n### Install dependencies\n\n```sh\n$ npm install\n```\n\n### Start the development server\n\n```sh\n$ npm start\n... server running at http://localhost:8080/\n```\n\n### Run tests\n```\n$ npm test\n... test output\n```\n\n### Production build\n```\n$ npm run build\n... create files in /dist\n```\n\n## Roadmap\n\n- [x] Widget as react app - index.html works (webpack, babel, react)\n- [x] React widget (widget builder)\n- [x] Webpack changed to output a library\n- [x] Add tests\n- [x] Add circleci integration\n- [x] Add codecov integration for codecoverage\n- [x] Production Build\n- [x] Minified\n- [x] Add greenkeeper\n- [x] Bookmarklet\n- [x] Reset / Cleanslate / No-conflicts of styles\n- [x] Obfuscation\n- [ ] Theming support\n- [ ] Storyboard and docs\n- [ ] Integrate eslint with webpack\n\n## Background\n\n### What is an embeddable widget?\n\n* Usable using a simple `\u003cscript\u003e` tag\n* Configurable with code\n* Themable\n\n### Why not in an iframe?\n\n* Interaction between the frame and the hosting page is tricky and not recommended\n* You can only display content within the iframe\n* iframe and content resizing is impossible\n* iframe sandboxing can result in missing functionalities\n\n### Read more\n\nRead more about about widgets, react and scoping of css.\n\n* https://www.robinwieruch.de/minimal-react-webpack-babel-setup/#hot-module-replacement\n* https://codeburst.io/building-react-widget-libraries-using-webpack-e0a140c16ce4\n* https://github.com/timarney/react-app-rewired\n* https://github.com/premasagar/cleanslate\n* https://github.com/krasimir/third-party-react-widget\n* https://github.com/jenyayel/js-widget\n* https://github.com/anakinjay/react-widget-starter\n* https://webpack.js.org/guides/author-libraries/\n* https://github.com/webpack-contrib/webpack-serve\n* https://medium.freecodecamp.org/part-1-react-app-from-scratch-using-webpack-4-562b1d231e75\n* https://github.com/facebook/create-react-app/blob/next/packages/react-scripts/config/webpack.config.prod.js\n* https://github.com/webpack-contrib/purifycss-webpack\n* https://medium.com/quick-code/from-zero-to-deploy-set-up-react-stack-with-webpack-3-20b57d6cb8d7\n* https://medium.com/dailyjs/building-a-react-component-with-webpack-publish-to-npm-deploy-to-github-guide-6927f60b3220\n* http://krasimirtsonev.com/blog/article/javascript-library-starter-using-webpack-es6\n* https://github.com/javascript-obfuscator/webpack-obfuscator\n* https://github.com/tsileo/embedded-js-widget\n* https://thomassileo.name/blog/2014/03/27/building-an-embeddable-javascript-widget-third-party-javascript/\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseriousben%2Fembeddable-react-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseriousben%2Fembeddable-react-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseriousben%2Fembeddable-react-widget/lists"}