-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from sul-dlss/dev-server
Add an HTTP server for local dev
- Loading branch information
Showing
3 changed files
with
588 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
/> | ||
``` |
Oops, something went wrong.