npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

berlioz-vue-demi

v1.4.0

Published

## Configurations ### Storybook The Storybook configuration is located in the `./.storybook/main.js` file. Adding custom controls is managed in the `./.storybook/preview.js` folder.

Downloads

4

Readme

Berlioz

Configurations

Storybook

The Storybook configuration is located in the ./.storybook/main.js file. Adding custom controls is managed in the ./.storybook/preview.js folder.

Typescript

The Typescript configuration is located in the ./tsconfig.json file.

Linters

Linters' configurations are shared across different projects in the monorepo; therefore, they are located in the ./packages/config folder.

Tailwind CSS

Similar to linters, the Tailwind CSS configuration comes from the ./packages/config folder.

Tests

Tests are written using the Jest framework along with Vue Testing Library. To run the tests, execute the following command: yarn test:unit

Test configuration can be found in the ./jest.config.js file.

Important Information

Berlioz is a design system, so it's essential to follow the following guidelines to ensure consistency across all components.

Guidelines

  • Each component should have a unique and descriptive name suffixed with Bz, for example: : ButtonBz
  • Don't forget to type the props and functions for each of the components.

Adding a Component

To add a component, you should follow these 3 steps or launch yarn run generate :

  • Validate the component with the design team.
  • Add a folder in /src/components with the component's name. Inside this folder, add the following files : ComponentNameBz.vue, ComponentNameBz.stories.js and ComponentNameBz.spec.js
  • Configure your story by adding the appropriate props :
import ComponentNameBz from "./ComponentNameBz.vue"

export default {
  title: "MyFolder/ComponentNameBz",
  component: ComponentNameBz,
  tags: ["autodocs"],
  render: (args, { argTypes }) => ({
    props: Object.keys(argTypes),
    components: { ComponentNameBz },
    template: "<ComponentNameBz />"
  }),
  argTypes: {}
}

export const Default = {
  args: {}
}

You can organize components into folders and specify the folder name in the title : MyFolder/ComponentNameBz. Choose a folder name from the following : atoms, components, layouts

  • Once your component is developed, write tests for it. Note that code cannot be pushed if the tests don't achieve at least 80% coverage. Here's a basic example of tests :
import { render } from "@testing-library/vue"

import ComponentNameBz from "./ComponentNameBz.vue"

describe("ComponentNameBz.vue", () => {
  it("check text in title", () => {
    const label = "Hello from @berlioz build"

    render(ComponentNameBz)

    const title = document.querySelector("h1")

    expect(title.textContent).toContain(label)
  })
})
  • When the component is ready, add it to the ./src/components/index.js file so that it can be exported and used in other projects.

Commit

Commitlint

Refer to the monorepo's README.

By pass lefthook

To avoid coverage report and to force push, you could use the following command:

LEFTHOOK_EXCLUDE=test_berlioz_coverage  g commit -m "my message"