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

@health.gov.au/health-design-system

v2.0.0-beta.5

Published

Design system for health.gov.au and related products.

Downloads

728

Readme

Health Design System

The Health Design System (HDS) is a design system for Australian Government Department of Health which is built on top of the DTA Design System.

Style Guide

View the Style Guide for documentation on how to use the Health Design System components.

The style guide is built using Fractal.

Dependencies

Optional

These are included in the javascript library folder for convenience.

Disable any of the optional libraries and related functionality by simply not including the library. You can find information on what functionality is provided by each library in the relevant component of the Style Guide.

Installation

Usage

Option 1: install as NPM package

The HDS can be added to a project as an npm package.

npm install @health.gov.au/health-design-system

You can generate a HTML version of Health Design System style guide in a project using the following cli command. The Style Guide will be located in the generated hds_style_guide directory and can be viewed by openning the ./style-guide/index.html file in a browser.

npx healthds build-guide

You can import the HDS core sass file into your project using @import "@health.gov.au/health-design-system/source/sass/all". This assumes the node_modules directory is included in you SASS build path.

JavaScript source files are available in @health.gov.au/health-design-system/health-design-system/source/js/src/.

Compiled version of CSS and JavaScript assets can be found in @health.gov.au/health-design-system/build/css/ and @health.gov.au/health-design-system/build/js/ respectively.

Option 2: Out of the box

Simply download and include the css and js files from the build folder. Include any library scripts.

Option 3: Build yourself

Clone, git submodule or download the repository.

Requires Node.js

Build using the built in Gulp tasks:

npm install and then run:

  • npm run gulp: Builds development and production ready CSS and JS files.
  • npm run gulp watch: Watches for changes and rebuilds.

Or you can import the core sass file into your pipeline @import "health-design-system/source/sass/all.scss"

Source javascript files are available in health-design-system/source/js/src.

Command line tool

A command line tool is available if you installed the HDS as a npm package.

| Command | Description | | --- | --- | | npx healthsd build-guide | Generates a statice HTML version of the HDS Style Guide in the current working directory. The Style Guide is create within the health-style-guide directory. | | npx healthsd help | Displays information on command usage. |

Project structure

The following is a description of important directories used in the project.

| Directory | Description | | --- | --- | | build/ | Compiled CSS and JavaScript files. | | docs/ | Compiled HTML version of the HDS component library (aka. the Style Guide). Guide can be access by opening docs/index.html in a browser. | | node_modules/ | Project dependencies added by NPM. | | source/js/ | JavaScript source files. Include JavaScript libraries as well as custom code. | | source/sass/ | SASS source files | | source/sass/components/@gov.au/ | Overrides to styles provided by the DTA Design System should be placed in this directory. Overrides should be placed in a SASS partial file with the same name as the file in which the style is defined within the DTA Design System. | | source/sass/components/@health/ | Styling for custom HDS components. These are components which are not a part of the DTA Design System. | | style-guide/ | Source template and configuration files for components included in the HDS component library (aka. the Style Guide). The Style Guide is created using Fractal. |

Health Design System development

Activate Git pre-commit hook.

npm start

Install dependencies:

npm install

Start Fractal development server. This will generate a local link to view the Style Guide. The style guide will be automatically updated when changes are made to the component source files. Note that to see any SASS related styling changes you will need to compile any SASS changes using either npm run gulp or npm run gulp:watch.

npm run fractal:start

To build a static HTML version of the Style Guide use the following command. After building the Style Guide can be accessed by opening docs/index.html file in a browser.

npm run fractal:build

The HDS uses Gulp to create compiled versions of the HDS CSS and JavaScript assets. The compiled files will be created in the build/ directory:

npm run gulp

HDS Starter Kit

setup.js is a file which is used to configure the HDS Starter kit. It is used to create a base fiel structure for instant development. More information about the HDS Starter kit can be found here: https://github.com/healthgovau/health-design-system-starter-kit