@adelholtz/vuetility
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Vuetility (README)

  1. Todo
  2. Prerequsisits
  3. Latest version
  4. Installation
  5. Introduction

TODO

  • allow/forbid undefined and null values for Model Properties
  • core implementation for non namespaced stores

Prerequsisits

  • Vue [vuejs.org]
  • Vuex [vuex.vuejs.org]
  • ...and a basic understanding of how both of these work (together)

Latest version

npm version

2.*

  • rework of how computed variables are created

Installation

npm install @adelholtz/vuetility

yarn add @adelholtz/vuetility

Introduction

    <input
        :value="Model.idn"
        @input="updateState" // provided by vuetility
        vuet-path="Model.idn"
    />
//computed structure
computed: {
    Model() {
        return { ...this.$store.getters['Estimation/estimationModel'] }
    },
}

Vuex is great but in my opinion its lacking something very basic. In every Vue project i came across so far you have to write the same computed properties in different components over and over again. Sure, you can streamline this by using various different approaches but the problem stays the same and you will have to overcome this in every new project thinking about the best way to organize things. Thats why i came up with this little 'plugin', 'wrapper' 'addition' or whatever you'd like to call it.

This does not reinvent Vuex in any way, it does not temper with the core of Vuex or Vue!

I see Vuetility, Vuex and Vue like a Matryoshka, consisting of several layers which build upon each other enhancing the layer beneath giving them access to more features and convenience functions.

What is Vuetility then in general?

Vuetility contains basic logic for generic (Vuex)store and (Vue)component usage, by auto-generating (Vue)computed properties and (Vuex)state variables from provided models.

It also gives you access to a set of predefined mutations which you can use with every state variable in your stores/modules.

The model can/must also contain:

  • a renderer per property.
  • default values
  • exact type definitions (String, Boolean etc.)

Project Goals:

  • no need to write any computed properties for your models properties in your custom component
  • no need to write code in your store that handles the update/setting process of model data
  • support of multiple models per store/component

Documentation: https://adelholtz.github.io/vuetility/

Please let me know if the usage instructions and example are unclear in any way and should be improved!

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.01latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.01
0.8.01
0.7.31
0.7.21
0.7.11
0.7.01
0.6.36
0.6.21
0.6.11
0.6.01
0.5.21
0.5.11
0.5.02
0.4.61
0.4.51
0.4.41
0.4.32
0.4.21
0.4.11
0.4.01
0.3.41
0.3.31
0.3.21
0.3.11
0.3.01
0.2.41
0.2.31
0.2.21
0.2.11
0.2.01
0.1.01
0.0.11

Package Sidebar

Install

npm i @adelholtz/vuetility

Weekly Downloads

26

Version

2.0.0

License

MIT

Unpacked Size

2.94 MB

Total Files

43

Last publish

Collaborators

  • adelholtz