k-plugin
k-plugin is a Cortex plugin. To see how to run the plugin inside of Cortex, see our docs.
Prerequisites
Developing and building this plugin requires either yarn or npm.
Getting started
- Run
yarnornpm installto download all dependencies - Run
yarn buildornpm run buildto compile the plugin code into./dist/ui.html - Upload
ui.htmlinto Cortex on a create or edit plugin page - Add or update the code and repeat steps 2-3 as necessary
Notable scripts
The following commands come pre-configured in this repository. You can see all available commands in the scripts section of package.json. They can be run with npm via npm run {script_name} or with yarn via yarn {script_name}, depending on your package manager preference. For instance, the build command can be run with npm run build or yarn build.
build- compiles the plugin. The compiled code root is./src/index.tsx(or as defined by webpack.config.js) and the output is generated intodist/ui.html.test- runs all tests defined in the repository using jestlint- runs lint and format checking on the repository using prettier and eslintlintfix- runs eslint in fix mode to fix any linting errors that can be fixed automaticallyformatfix- runs Prettier in fix mode to fix any formatting errors that can be fixed automatically
Available React components
See available UI components via our Storybook.
On this page
Languages
TypeScript69.3%JavaScript28.8%HTML1.6%CSS0.3%
Contributors
Created March 12, 2025
Updated March 12, 2025