@hacksc/ui-kit
v1.0.2
Published
The official HackSC UI kit
Readme
HackSC official UI kit
We build everything here :)
Available Scripts
npm test
Launches the test runner in the interactive watch mode.
npm run build
Builds the UI kit for production to the build folder. It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Testing the UI kit in a demo app
If you want to test your changes for the UI kit on a separate React app, you will need to temporarily symlink the React dependency of your demo app to this package.
The reason is because we use React hooks in this UI kit :) and you would be running 2 instances of React per this when you do npm link @hacksc/ui-kit in your demo app if you don't do the below steps (or equivalent steps to ensure only one React instance is present on your demo app).
cdto your demo app folder (should be a React/Next.js app)- Make sure you installed all dependencies in your demo app via your favorite
installcommand. This app must have a React dependencies version that is compatible with the React version specified in this package (inpackage.json'speerDependencies) cdback to our UI kit folder, andnpm link ${PATH_TO_APP}/node_modules/reactto temporarily symlink the demo app's React to this UI kit. the UI kit's- Run
npm linkto create a global symlink for this UI kit cdback to the demo app- Run
npm link @hacksc/ui-kitto symlink the global symlink for the UI kit into the app'snode_modules - Start the demo app and start playing around with the kit! Since it's a
symlink, any changes to the UI kit in the
ui-kit/folder will require abuildfirst before it reflects on the demo app.
