inmusic-kratos-components
v0.0.30
Published
This project provides kratos components that can easily be embedded in Magento.
Downloads
60
Readme
Kratos Components
This project provides kratos components that can easily be embedded in Magento.
Table of Contents
- Components
- Development
- Building Components
- Deploying Changes to Kratos Components
- Embedding the Components
- Configuration
Components
KratosLogin
Provides a kratos login form.
Development
To view components locally, run yarn run dev and navigate to http://localhost:5173.
Building Components
Components can be built for production with yarn run build.
The output of the build process should include:
- A
distfolder containing the compiled JavaScript code for the React components in a file calledkratos-components.js. - A
style.cssfile containing the CSS modules for the components.
Deploying Changes to Kratos Components
The components are currently deployed to NPM and changes can be deployed by running npm publish from the kratos directory. You can version your changes in the package.json file.
Accessing the Components
The latest version can be accessed at inmusic-kratos-components on NPM. All versions of this package are also automatically distributed on unpkg. For the latest version, the file can be accessed from https://unpkg.com/inmusic-kratos-components/dist/kratos-components.js.
Individual versions can be accessed from npm, e.g. https://www.npmjs.com/package/inmusic-kratos-components/v/1.0.0 and unpkg, e.g. https://unpkg.com/[email protected]/dist/kratos-components.js.
Embedding the Components
The components can be embedded into a web page using a script tag. For example:
<script
type="module"
src="https://unpkg.com/inmusic-kratos-components/dist/kratos-components.js"
></script>
<link
rel="stylesheet"
href="https://unpkg.com/inmusic-kratos-components/dist/style.css"
></link>Configuration
TBD
