hooks-demo is a Cortex plugin. To see how to run the plugin inside of Cortex, see our docs.
Developing and building this plugin requires either yarn or npm.
- 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
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
See available UI components via our Storybook.