Gathering detailed insights and metrics for @bostonuniversity/bulib-wc
Gathering detailed insights and metrics for @bostonuniversity/bulib-wc
Gathering detailed insights and metrics for @bostonuniversity/bulib-wc
Gathering detailed insights and metrics for @bostonuniversity/bulib-wc
collection of web components and customizations used at Boston University Libraries
npm install @bostonuniversity/bulib-wc
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1,002 Commits
1 Watching
16 Branches
19 Contributors
Updated on 04 Oct 2024
MDX (33.38%)
JavaScript (23.54%)
HTML (21.17%)
CSS (18.75%)
SCSS (2.49%)
Shell (0.67%)
Cumulative downloads
Total Downloads
Last day
64.1%
1,777
Compared to previous day
Last week
-0%
8,291
Compared to previous week
Last month
-11.9%
35,864
Compared to previous month
Last year
-35.9%
568,436
Compared to previous year
3
19
collection of web components and customizations used at Boston University Libraries
This repository contains web assets of Boston University Libraries that are used across a variety of our sites and demonstrated in isolation via storybook.
These take a number of forms...
sites/
assets/
src/
src/_helpers/
)...and depend on a number of technologies...
lit-element
library for more advanced functionality...towards the end of...
Install dependencies via node package manager
1$ brew install node 2$ git clone https://github.com/bu-ist/bulib-wc.git 3$ cd bulib-wc 4$ npm install
note: additional steps and troublshooting can be found in the wiki
running the following will open up a new tab in your browser at localhost:9001/?path=/story/
, and watch for changes.
1$ npm run start
you can make changes to existing elements and see them in that running server by navigating to that component in the sidebar.
to create a new one, make a new entry in /docs/index.stories.js
based off of the existing ones
to build a bundle, run the following, noting that the default will use the rollup.config.js
.
1$ npm run build
or a bundle with open-wc
version (with codesplitting), run:
1$ npm run build:owc
you can also build a static copy of the static docs site via:
1$ npm run build:storybook
We expect to continue to manage versioning this repository with npm, but we want to make sure that updates are synchronized (e.g. our demo site and github tags are all in sync), so we've made a script to help assist with that
1$ npm run deploy
we use semantic versioning (semver), and assume by default that you're publishing a patch
. If you'd like to
specify the level of change you're making (e.g. you want to mark a significant addition in functionality or a milestone in the project)
you can specify major
or minor
as well:
1$ npm run deploy [patch, major, minor]
Sometimes you may just want to update the storybook to demonstrate a change before you're finished developing (without publishing a new package for it on NPM) to verify the implementation is correct or desired functionality with a third party (like your advisor). You can update only the storybook by running the following:
1$ npm run deploy:storybook
We consume the published package over two main CDNs (unkpg, jsdelivr),
versioned and deployed using npm and added to each platform via a series of <script>
and <link>
tags stored in the <head>
.
All the web components are imported together from a single index.js
file. Unpkg does some mapping here to chain together a
number of calls that leverage the module
specification. This does the work that a bundler would do, but without the
extra build step, transpilation, etc.
note: one can import a specific version (e.g. bulib-wc@0.0.92
) or the most recently published one (bulib@latest
)
1<!-- load web components --> 2<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2.1.3/webcomponents-loader.min.js"></script> 3<script src="https://unpkg.com/bulib-wc@0.1.0/src/index.js?module" type="module"></script>
For the css, we have both a shared "bundle" (created via scripts/bundle_css.sh
), and site-specific forms for each site_name
.
These are imported via <link>
like the following. Further customizations for each site are in sites/**.css
.
NOTE: if you don't include the bundle.min.css
stylesheet as well as the index.js?module
in a given site, the styling for many components will be broken
1<!-- styling --> 2<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bulib-wc@0.1.0/dist/bundle.min.css"> 3<!--link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bulib-wc@latest/dist/{site_name}.css"-->
An example of what all to include in each site's <head>
is also available at sites/shared.html
.
No vulnerabilities found.
No security vulnerabilities found.