Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.
/ furnace Public archive

🔥 Melts down the Design System components into a zip file.

License

Notifications You must be signed in to change notification settings

govau/furnace

Repository files navigation

The Australian Government Design System has been decommissioned Visit our community page for more information

🔥 Furnace

Melts down the GOLD ( Design System ) components into a zip file.

The furnace is an express server that allows users to easily get started with the Australian Government Design System. The furnace dynamically builds zip files based on each selected component and options that are sent to the server.

Install

npm install
npm run build

Then run npm start or npm watch to start the server.

Getting started

Once the server is started it can now take POST requests at the URL http://localhost:8080/furnace/. The POST requests are in the form of:

{
	components: [ 'accordion', 'breadcrumbs' ],
	styleOutput: 'css',
	jsOutput: 'js',
}

The above POST would return a zip file containing minified css and js for all of the dependencies of accordion and breadcrumbs.

components

An array of components that relates to the currently live components in the GOV.AU Design System.

styleOutput

  • css: css minified
  • cssModules: css modules for each component
  • sassModules: sass modules for each component

jsOutput

  • js: js minified
  • jsModules: js modules for each component
  • react: react modules for each component

Testing

To test that the furnace is working run npm run test. This runs a unit test against the functions making sure the output is correct. It also runs an integration test making sure that a mock zip file is downloaded and has the correct output.

You can also manually test the furnace by sending a POST to the local instance.

  • Install the dependencies npm install
  • Starting the furnace npm run watch
  • Send a POST to the furnace while it is running using curl:
curl -d "components=accordion&components=breadcrumbs&styleOutput=css&jsOutput=js" http://localhost:8080/furnace >> designsystem.zip

Slack webhook

To update the slack channels receiving notifications, run the following:

$ cf uups ups-furnace -p '{SLACK_WEBHOOKS: ... }'

with the appropriate slack webhook URL

Read the cf-docs for more.

Changelog

  • v1.0.0 - Initial version of the furnace