Skip to content

Commit

Permalink
Merge pull request #91 from sul-dlss/dev-server
Browse files Browse the repository at this point in the history
Add an HTTP server for local dev
  • Loading branch information
jcoyne authored Jan 15, 2025
2 parents 0e7050f + 0fe5860 commit 51b8441
Show file tree
Hide file tree
Showing 3 changed files with 588 additions and 17 deletions.
57 changes: 41 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,57 @@
# DLSS design component library
Reference implementation of components for DLSS

* [Alert](alerts/)
* [Button](button/)
* [Footer](footer/)
* [Header](header/)
* [Links](links/)
* [Selected Item](selected_item/)
* [Selected Facet](selected_facet/)
* [Toast](toast/)
* [Facet list](facets/)

Reference implementation of components for DLSS

A note about color. The primary color will always be "digital blue". A site may
- [Alert](alerts/)
- [Button](button/)
- [Footer](footer/)
- [Header](header/)
- [Links](links/)
- [Selected Item](selected_item/)
- [Selected Facet](selected_facet/)
- [Toast](toast/)
- [Facet list](facets/)

A note about color. The primary color will always be "digital blue". A site may
choose a secondary color like "cardinal" or "digital green".

See <https://identity.stanford.edu/design-elements/color/web/>

## Linting
```
## Setup

```sh
npm install
npx stylelint "**/*.css"
```

All dependencies are for local development only.

## Dev server

Run a simple HTTP server:

```sh
npm start
```

Note that this is required to resolve some paths in development, e.g. `url()` references to files in CSS will not resolve unless the server is running to serve them.

## Linting

Lint the styles with `stylelint`:

```sh
npm run lint
```

This also runs in CI.

## Releasing

Currently these are hosted via jsDelivr which creates hosted versions of every release. The best way to update the component library is to cut a release here and then link to the primary style in the `<head>` of the HTML. `https://cdn.jsdelivr.net/gh/sul-dlss/component-library@[version]/styles/sul.css`:

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/sul-dlss/component-library@v2024-09-04/styles/sul.css" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/sul-dlss/component-library@v2024-09-04/styles/sul.css"
/>
```
Loading

0 comments on commit 51b8441

Please sign in to comment.