Coder Social home page Coder Social logo

difuoan / luvely Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.95 MB

Vue component library with unit-, integration- and e2e-tests. Dockerized.

TypeScript 2.80% Dockerfile 0.06% Makefile 0.22% CSS 2.78% Shell 0.03% Vue 2.96% MDX 2.29% JavaScript 4.46% HTML 84.39%
docker jest storybook typesc vite vue component-library

luvely's Introduction

LuVeLy Component Library

Dockerized storybook component library with all the goodies!

Overview

Installing & Running Repository

Prerequisites

Clone & Install Repository

git clone https://github.com/difuoan/storybook
cd storybook
make init

Make sure to update the .env file with your credentials

Then build the container.

make build

Run Repository

Unless you have changed the DOMAIN variables in the .env or .env.example file the storybook UI should be reachable under storybook.localhost after you run the following command.

make up

Enable Visual Tests

Visual Testing panel inside the storybook UI

Follow the setup process further. The next steps will be described in the "Visual Tests" panel inside the storybook UI (see screenshot โ‡’)


Run Tests

You can view the results in the "Report" pages in the storybook UI.

make test

Run Individual Tests

make test-e2e       # run end to end tests
make test-unit      # run unit tests
make test-storybook # run component tests

Playground

You can create a playground to manually test your components based on the src folder. It will behave like a regular single page application (no router installed). The playground will run automatically when you run make up, so you probably won't need the following command.

make playground

All make Commands

init           # initialise the env
up             # start the container
start          # start the container
down           # end the container
stop           # end the container
tail           # echo logs
build          # build image
restart        # restart container
clear          # destroy environment
ps             # print all docker containers
login          # open bash in container
playground     # run vite page
test           # run all tests
test-storybook # run storybook (component) tests
test-unit      # run unit tests
test-e2e       # run end to end tests

Knowledge

Issues

  • If the "Report" pages doesn't work it's probably because the tests haven't been exectured yet. Read the Run Tests section.
  • If the .env file keeps resetting it's probably because you have re-initialised the project. Don't call make init or change the variables in the .env.example file instead.
  • If you want to execute npm commands use make login to ensure they get executed from within the container and as the correct user.
  • If you find a console output about Download the React DevTool or something like that you can probably safely ignore it by right-clicking the message and hiding it from the context menu.

luvely's People

Contributors

difuoan avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.