nrkno / Core Components
Programming Languages
Labels
Projects that are alternatives of or similar to Core Components
@nrk/core-components
A kit of lightweight, unstyled and accessible Javascript and React / Preact components. It provides effortless and flexible usage, while under the hood enhancing markup and functionality for best best user experience across all major browsers and screen readers.
Documentation
https://static.nrk.no/core-components/latest/
Local development
First clone @nrk/core-components
and install its dependencies:
git clone [email protected]:nrkno/core-components.git
cd core-components
npm install # Installs dependencies for all packages
npm start # Your browser will open documentation with hot reloading
Testing
Before running tests you need a .env
file providing credentials to Browserstack:
BROWSERSTACK_USER=...
BROWSERSTACK_KEY=...
Save it in the root directory. Now you can either run the tests locally:
npm test
or remotely against all targeted browsers:
npm run test-remote
Building and committing
After having applied changes, remember to build before pushing the changes upstream.
git checkout -b feature/my-changes
# update the source code
npm run build # Builds all the packages
git commit -am "Add my changes"
git push origin feature/my-changes
# then make a PR to the master branch,
# and assign another developer to review your code
Publishing
npm run publish:minor -- --core-input --core-toggle # Specify packages to publish
NOTE! Please also make sure to keep commits small and clean (that the commit message actually refers to the updated files). Stylistically, make sure the commit message is Capitalized and starts with a verb in the present tense (for example
Add minification support
).