Skip to content

Latest commit

 

History

History
117 lines (81 loc) · 3.69 KB

README.md

File metadata and controls

117 lines (81 loc) · 3.69 KB

d2l-labs-tag-picker

NPM version Dependabot badge Build status

Note: this is a "labs" component. While functional, these tasks are prerequisites to promotion to BrightspaceUI "official" status:

Autocompleting dropdown to choose one or more new or pre-existing tags

Installation

To install from NPM:

npm install @brightspace-ui-labs/tag-picker

Usage

<script type="module">
    import '@brightspace-ui-labs/tag-picker/tag-picker.js';
</script>
<d2l-labs-tag-picker>My element</d2l-labs-tag-picker>

Properties:

Property Type Description

Accessibility:

To make your usage of d2l-labs-tag-picker accessible, use the following properties when applicable:

Attribute Description

Developing, Testing and Contributing

After cloning the repo, run npm install to install dependencies.

Running the demos

To start an es-dev-server that hosts the demo page and tests:

npm start

Linting

# eslint and lit-analyzer
npm run lint

# eslint only
npm run lint:eslint

# lit-analyzer only
npm run lint:lit

Testing

# lint, unit test and visual-diff test
npm test

# lint only
npm run lint

# unit tests only
npm run test:headless

# debug or run a subset of local unit tests
# then navigate to `http://localhost:9876/debug.html`
npm run test:headless:watch

Visual Diff Testing

This repo uses the @brightspace-ui/visual-diff utility to compare current snapshots against a set of golden snapshots stored in source control.

# run visual-diff tests
npm run test:diff

# subset of visual-diff tests:
npm run test:diff -- -g some-pattern

# update visual-diff goldens
npm run test:diff:golden

Golden snapshots in source control must be updated by Travis CI. To trigger an update, press the "Regenerate Goldens" button in the pull request visual-difference test run.

Versioning, Releasing & Deploying

All version changes should obey semantic versioning rules.

Include either [increment major], [increment minor] or [increment patch] in your merge commit message to automatically increment the package.json version and create a tag.