/
├── .github/ # GitHub Actions workflows for CI/CD
├── packages/ # Contains individual packages
│ ├── vue-component-library/ # The primary Vue 3 component library
│ └── nuxt-module/ # Nuxt 3 module to auto-import components
├── .gitignore
├── pnpm-workspace.yaml # PNPM workspace configuration
├── package.json # Root-level metadata and scripts
├── README.md # This documentation file
└── ...
git clone https://github.com/UCLALibrary/ucla-library-website-components.git
cd ucla-library-website-components
pnpm install
This monorepo contains the ucla-library-website-components library, a Vue 3 component library designed for UCLA Library websites using Nuxt 3. The monorepo utilizes: PNPM workspaces for dependency management.
-
Vite for building the component library.
-
Semantic Release for automated versioning.
-
PNPM Publish for package publication.
-
GitHub Actions for CI/CD workflows.
pnpm lib:storybook
pnpm lib:cypress
pnpm lib:build
- Percy runs automatically when merged into main.
- For manual Percy checks:
- Visit the GitHub Actions tab.
- Run the "Percy" workflow manually.
- Percy checks run in CI/CD after merging into main.
pnpm -r lint:fix
-
@ucla-library-monorepo/ucla-library-website-components
-
Vue 3 component library
-
Built with Vite and TypeScript
-
Exports components individually for optimal tree-shaking
-
-
@ucla-library/nuxt-module
- Nuxt 3 module that auto-imports the above components
-
Versioning: Managed by Semantic Release based on commit messages.
-
Publishing: Handled via PNPM Publish for greater control over registry updates.
- Create a new branch with your changes.
- Follow conventional commit standards to tag your commits.
- Open a pull request.
- Upon merging into main, GitHub Actions will:
- Run Percy checks.
- Perform a release using semantic-release.
- Publish the package using pnpm publish.
pnpm add --save-dev @ucla-library-monorepo/ucla-library-website-components or pnpm install @ucla-library-monorepo/ucla-library-website-components --save-dev
css: [
'@ucla-library-monorepo/ucla-library-website-components/style.css',
],
For direct imports:
import { ButtonLink } from '@ucla-library-monorepo/ucla-library-website-components'
- Always install or add packages from the root
- if adding a package to component library
pnpm --filter @ucla-library-monorepo/ucla-library-website-components add lodash
- if adding package to root use
pnpm install semantic-release-monorepo -w
- Using pnpm link for Local Development
- To link your component library locally in a Nuxt project:
pnpm run lib:build
cd packages/vue-component-library
pnpm link --global
cd ../your-nuxt-project
pnpm link @ucla-library/ucla-library-website-components
or
pnpm run lib:build
cd ../your-nuxt-project
code .
open package.json
"@ucla-library-monorepo/ucla-library-website-components": "file:/Users/[path to]/ucla-library-website-components/packages/vue-component-library"
PNPM workspaces PNPM catalogs Semantic Release Documentation