0.1.0 • Published 4 years ago

cp-ui-library v0.1.0

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

Career Partner UI Library

This repository contains the sources of our ui library with all the re-usable user interface components written in Vue.js.

Project setup & develop locally

# 1. install dependencies
$ npm install

# 2. start storybook server in watch mode
$ npm start

Storybook demo URL

Testing

Run unit tests locally

$ npm test

End-2-End tests

We only use browserstack, so run one of the browserstack-related commands in package.json and watch the etsts on https://automate.browserstack.com/

Example:

$ npm run test:browserstack:chrome

Lints and fixes files

$ npm run lint

Code Style

We have an automatic pre-commit setup using Prettier and Stylelint which auto-fixes code style related stuff on each commit. This makes sure we follow a consistent code style and prevents senseless discussions 😁

Library usage

  1. Install via npm+git:
"ui-library": "git@bitbucket.org:cp-dev/ui-library.git#master",

For dev: test locally via npm link. See https://docs.npmjs.com/cli/link

  1. Import our library:
// in your js main file
import CPUILibrary from 'ui-library';
...
Vue.use(CPUILibrary);

// in your scss main file:
@import '~ui-library/dist/CPUILibrary.css';
  1. Use the components
// For example
<cp-button ...>This is a button</cp-button>