Tara Checkout
A highly customizable checkout widget built for client use.
Dependencies
- NodeJS v18 or higher.
Installation
To install package dependencies:
npm i -D
Distribution and bundling
To build distribution files:
npm run build
This will generate a dist/
folder with development and production ready css and js files.
CSS/Less
To compile less files:
lessc src/less/taracheckout.less src/css/taracheckout.css
When making changes to taracheckout form styling. Please do it on src/less/taracheckout.less
.
To automatically watch less file changes:
less-watch-compiler
Please see less-watch-compiler.config.json
.
Development
Assuming the dist/
folder was generated and less-watch-compiler
enabled. You can test it locally by creating a .local/
folder and add the following files:
test.js
taracheckout.client.create({
authorization: "insecure-secret-key",
}, (instance) => {
taracheckout.form.create({
selector: "#checkout-form",
});
});
test.html
<!DOCTYPE html>
<html lang="en">
<head>
<script src="../dist/js/taracheckout.js"></script>
</head>
<body>
<div id="checkout-form"></div>
<script src="./test.js"></script>
</body>
</html>
Then run the server:
npm run server
This will run a lightweight server and the html page is accessible at: http://localhost:5500/.local/test.html
Versioning
All changes made on this repository is subject to version change. We should bump the package.json.version
value by following the semver guidelines.
- MAJOR version change is a non-backward compatible and introduce breaking changes. Consumers would be affected by this change.
- MINOR version change is when you add new features with backward compatible changes. Consumers should not be affected by this change.
- PATCH version change is when you made bakward compatible bugfixes, refactorings, and chore changes. Consumers should not be affected by this change.
Additional labels related to pre-release and build metadata should be available as extensions to the MAJOR.MINOR.PATCH
format e.g. 0.0.1-beta
, 0.0.1-dev
.
Live Examples
Default style
Try live default version example. Open in CodePen.