@dript/widget
v1.0.12
Published
Dript Widget
Downloads
52
Readme
Simplified Dript Widget Development Workflow
This is a streamlined setup for building and serving your Dript Widget SDK within a Turborepo workspace.
What This Does
- Compiles TypeScript to generate type definitions
- Bundles your code with esbuild (with minification)
- Serves the bundled file at localhost:3007
- Watches for changes and rebuilds automatically
Usage with Turborepo (Recommended)
In your Turborepo, you can specify this package as a dependency and use turbo run dev to start everything.
How to Use
Development Mode:
npm run devThis will start the builder in watch mode and serve at http://localhost:3007/dript-widget.js
Build for Production:
npm run buildThis creates a production-ready minified bundle.
Integration
To use the widget in other projects during development:
<script src="http://localhost:3007/dript.min.js"></script>
<script>
const widget = new DriptWidget({
buttonText: "Deposit money via Credit Card",
// other options...
});
</script>