🔥 Melts down the Design System components into a zip file.
Branch: master
Clone or download
Latest commit 57b99e4 Jan 29, 2019

README.md

🔥 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

Changelog

  • v1.0.0 - Initial version of the furnace