4.0.4 • Published 2 years ago

@zuckersalzundpfeffer/growtrade-ui v4.0.4

Weekly downloads
168
License
ISC
Repository
github
Last release
2 years ago

growtrade UI Library

Installation as maintainer

  1. Clone the repository
  2. yarn install to install all dependencies
  3. yarn serve to start the development server
  4. commit your changes to github

Installation as a package in projects

TBD import as npm package than include in main.js as dependency

import growtradeUI from '@/growtrade-ui';
Vue.use('growtradeUI');

change the vue.config.js to use sass from dependency

module.exports = {
  css: {
    loaderOptions: {
      sass: {
        prependData: `@import "@zuckersalzundpfeffer/growtrade-ui/dist/theme/theme.scss";
        @import "~@/assets/vars.scss";`
      }
    }
  }
};

Developing for the library

Ruleset

  1. All components have to be stored in ./src/elements/components
  2. Each component registered property has to have a default value
  3. Low-level components like button or input only emit Events like "clicked" or "input" or "change". There is no logic inside the low-level components.
  4. Each components uses the prefix cot (e.g. cotButton). This is used to identify components in the library registry. IT's NOT WORKING WITHOUT
  5. Each component has to have a name attribute. The name is used to register the component properly

Developing a component

Start your work inside the ./src/elements/components dir. You can use subfolders if you like. They are not necassary for later use.

To add the component to the library after developing the component itself, you have to add the component to the elements.js file inside the ./src/elements/ folder. To import the component you have to:

  1. import the component at the top of the file import <componentname> from <location of the component>

  2. add the component to the const components-array

  3. add the component to the export default object
  4. have a cup of coffee

Testing your components

Each component in the elements.js file is automatically injected into the development-server. If you have the server running, you can see the component directly in the browser with its default values. If you want to check out the variants of your component you have to add them manually to the Storybook.vue file inside the elements dir.

Pushing new changes

To be able to push the package to npm you need an account at npm and have to be invited to the growtrade-ui package

Then you can push your changes to the project like this:

  1. make your changes (own branch)
  2. merge changes into master
  3. npm version x.x.x (x.x.x is the new version number)
  4. yarn package
  5. git add .
  6. git commit -m"message"
  7. git push
  8. npm publish

#OR: run ./publish-patch.sh for minor changes (chmod -x publish-patch.sh) if access error

After the package is published you can update it in other repos via: yarn or specific with yarn add @zuckersalzundpfeffer/growtrade-ui

4.0.4

2 years ago

4.0.1

2 years ago

4.0.3

2 years ago

4.0.2

2 years ago

4.0.0

2 years ago

3.0.12

3 years ago

3.0.11

3 years ago

3.0.10

3 years ago

3.0.8

3 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.5

3 years ago

3.0.9

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

1.2.50

3 years ago

1.2.49

3 years ago

1.2.48

3 years ago

1.2.47

3 years ago

1.2.46

3 years ago

1.2.44

3 years ago

1.2.43

3 years ago

1.2.42

3 years ago

1.2.41

3 years ago

1.2.40

3 years ago

1.2.39

3 years ago

1.2.38

4 years ago

1.2.37

4 years ago

1.2.36

4 years ago

1.2.34

4 years ago

1.2.35

4 years ago

1.2.33

4 years ago

1.2.32

4 years ago

1.2.27

4 years ago

1.2.28

4 years ago

1.2.30

4 years ago

1.2.31

4 years ago

1.2.29

4 years ago

1.2.26

4 years ago

1.2.23

4 years ago

1.2.24

4 years ago

1.2.25

4 years ago

1.2.22

4 years ago

1.2.19

4 years ago

1.2.20

4 years ago

1.2.21

4 years ago

1.2.18

4 years ago

1.2.16

4 years ago

1.2.17

4 years ago

1.2.14

4 years ago

1.2.15

4 years ago

1.2.13

4 years ago

1.2.12

4 years ago

1.2.11

4 years ago

1.2.10

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.1.14

4 years ago

1.1.12

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

5 years ago

0.0.1

5 years ago