npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dotkomonline/design-system

v0.22.2

Published

Online's Design System, simply dubbed Design System (DS), is made by us at [dotkom](https://github.com/dotkom/) for [Online](https://online.ntnu.no/).

Downloads

9

Readme

Design System

Online's Design System, simply dubbed Design System (DS), is made by us at dotkom for Online.

The components in DS are designed with consistency in mind, and our main goal is to make it easier for dotkom to develop web pages that adhere to Online's style.

See the components live at: design.online.ntnu.no.

Usage

Before importing and using a component, the <GlobalStyle /> component should be applied to your project, preferably at root-level. This component applies the global style rules and resets which are the baseline for DS. Without it, components will likely not look or act as intended, so this is very important.

import React from 'react';
import { GlobalStyle } from '@dotkomonline/design-system';
import App from './App';

export const Root = () => (
  <>
    <GlobalStyle />
    <App />
  </>
);

After that, importing and using components is as simple as:

import React from 'react';
import { Message } from '@dotkomonline/design-system';

export const SuccessMessage = ({ children }) => <Message type="success">{children}</Message>;

To get the fonts and icons to work you will also need to include them in the head of your application. In your index.html, or your alternative, include this:

<link
  href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700|Source+Serif+Pro|Source+Code+Pro|Material+Icons+Outlined"
  rel="stylesheet"
/>

Development

npm i to install the dependencies.

npm run start to start the storybook environment.

Before contributing

You will need to follow the rules from eslint and prettier. To verify that you follow the rules, run:

npm run lint-check
npm run format-check

If you want to autoformat, use these:

npm run lint
npm run format

If you want to run a chromatic test (UI image diff), use:

CHROMATIC_APP_CODE={get-app-code-from-dotkom} yarn chromatic # This may take som time
# Then, go your last build on https://www.chromaticqa.com/builds?appId=5dea690ec744f30020aaf273 to review changes in UI.

Editor config

We use MDX with Storybook, so we recommend using a plugin for syntax highlighting etc.

As mentioned, we use eslint and prettier to lint our TypeScript. We followed the setup used here. We use Visual Studio Code for development, and the guide provides a handy snippet for your editor configuration:

"eslint.autoFixOnSave": true,
"eslint.validate": [
  "javascript",
  "javascriptreact",
  { "language": "typescript", "autoFix": true },
  { "language": "typescriptreact", "autoFix": true }
],
"editor.formatOnSave": true,
"[javascript]": {
  "editor.formatOnSave": false,
},
"[javascriptreact]": {
  "editor.formatOnSave": false,
},
"[typescript]": {
  "editor.formatOnSave": false,
},
"[typescriptreact]": {
  "editor.formatOnSave": false,
},

The snippet above sets up automatic formatting on save! You might need plugins for ESLint and Prettier for this to work.

Publishing to npm

DS will automatically be published to npm when a branch beginning with fix/ producing a patch version change, and a branch beginning with feat/ producing a minor version change.

You can also publish DS manually by incrementing the version number in package.json. Keep in mind that we try to follow semantic versioning in dotkom.

Thanks

Thanks to Chromatic for providing the visual testing platform that helps us catch unexpected changes on time.