kalos-script-starter v1.0.0
Kalos Script Starter
This repo exists to help facilitate the publishing of react modules in the kalos system. It assumes some familiarity with:
- TypeScript
- React
Dependencies:
- nodejs
- yarn
Getting Started
After cloning the repo, you should check out a new a branch named after the module you intend to export:
git checkout -B MyModuleNext you need to generate a .env file by using yarn to run the setenv command:
yarn setenvFollow the prompts. The defaults are tailored to React, but this library can be used to generate any kind of JavaScript module by specifying different dependencies and a different module target. If you don't understand the prompts follow the default.
You can also modify base.env and save it as .env to generate your .env file. The .env file can be edited at any time after generation, either directly or by rerunning yarn setenv.
You can then run yarn build to build the module. In the dist folder you will find the generated script and an HTML file that attempts to import and mount the Main class exported by your module. This may require some editing, but browser errors should give you enough information to get this running.
Publishing
I will add a publishing script soon
6 years ago