Pattern library for data.govt.nz
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
dist Dist and docs Feb 21, 2019
docs Dist and docs Feb 21, 2019
kss-template
src Add highlight names to bubbles in docs Feb 21, 2019
.editorconfig Initial structure commit Nov 7, 2018
.gitignore Moved styleguide to docs folder Nov 13, 2018
.npmignore Added npmignore Nov 14, 2018
LICENSE Initial structure commit Nov 7, 2018
README.md Add an optional namespace to data attributes Feb 20, 2019
gulpfile.js Add woff2 file type to icon formats (currently 404ing) Dec 6, 2018
kss-config.json
package-lock.json
package.json Moved clipboard, popper and tooltip js to main dependencies. Dec 2, 2018
webpack.config.js

README.md

Rua Pattern Library

Table of Contents

  1. Installation
  2. Development
  3. Usage

Installation

npm install

@todo Register to npm.js so we can run

npm install rua-pattern-library

Development

npm run watch

or

gulp watch

Your default browser should open to localhost:3000 or increment to the next available port.

Note: on first run you may get an error cannot GET /. Try running npm run build then watch again.

Build

npm run build

or

gulp

Usage

@import '~rua-pattern-library/src/rua';
// Optionally set window.dataTargetNamespace to a custom value (e.g. 'rua-' would mean you'd use `data-rua-toggle="..."`)

import {
    toggler,
    matchHeight,
    clipboard,
    tooltip
} from 'rua-pattern-library/src/9-plugins'

$(document).ready(function(){
    matchHeight()
    toggler()
    clipboard()
    tooltip()
})