# @cherrypulp/vue-core

> A set of useful Vue.Js plugins to build your next project with ease

Latest version **2.2.0** (published 2021-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cherrypulp/vue-core
pnpm add @cherrypulp/vue-core
yarn add @cherrypulp/vue-core
bun add @cherrypulp/vue-core
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2021-08-10 |
| First published | 2021-08-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 693.8 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daniel Sum |
| Maintainers | dbennani_cherry, danielsum, cherrypulpcom, monkeymonk, anthonypauwels |
| Keywords | vue, library, playwork, boilerplate, starter |

## Links

- npm: https://www.npmjs.com/package/@cherrypulp/vue-core
- Repository: https://github.com/cherrypulp/vue-core
- Homepage: https://github.com/cherrypulp/vue-core#readme
- Issues: https://github.com/cherrypulp/vue-core/issues
- npm.io page: https://npm.io/package/@cherrypulp/vue-core

## Dependencies (8)

- [vue](https://npm.io/package/vue.md) ^3.1.5
- [vuex](https://npm.io/package/vuex.md) ^4.0.2
- [axios](https://npm.io/package/axios.md) ^0.21.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [core-js](https://npm.io/package/core-js.md) ^3.16.1
- [ant-design-vue](https://npm.io/package/ant-design-vue.md) ^2.2.3
- [@headlessui/vue](https://npm.io/package/@headlessui/vue.md) ^1.4.0
- [@cherrypulp/i18n](https://npm.io/package/@cherrypulp/i18n.md) ^1.3.4

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 2.2.0 (latest) — 2021-08-10
- 2.1.0 — 2021-08-10
- 2.0.0 — 2021-08-09
- 1.0.3 — 2021-08-05
- 1.0.2 — 2021-08-05
- 1.0.1 — 2021-08-05
- 1.0.0 — 2021-08-05

## README

# VueCore

A set of interoperable plugins based on one simple config setup.

## Why ?

Finding and configuring plugins could be daunting and cumbersome. 

GetBlok helps you to choose the right combo to have interroperable plugins for your bootstrapped Vue project with an opiniated design.

## Installing

```
npm i @cherrypulp/vue-core
```

In your script file : 

```
import {createApp} from 'vue';
import App from './App.vue';
import {VueCore} from '@cherrypulp/vue-core';
// @see : https://2x.antdv.com/docs/vue/customize-theme
import 'ant-design-vue/dist/antd.css';

import './index.css';

createApp(App)
    .use(VueCore, {
        api: {
            url: 'https://jsonplaceholder.typicode.com', // Replace with your api endpoint
        },
        i18n: {
            translations: {
                hello: 'Hello World !',
            },
            language: 'en'
        }
    })
    .mount('#app');
```

### List of available plugins : 

- [https://www.npmjs.com/package/@cherrypulp/i18n](https://www.npmjs.com/package/@cherrypulp/i18n)
- [https://www.npmjs.com/package/axios](https://www.npmjs.com/package/axios)
- [https://2x.antdv.com/](https://2x.antdv.com/)
- [https://lodash.com/](https://lodash.com/)

### Example

This will automatically add 3 helpers, $http for http request, $api for api request, __ for translations.

````
<template>
  <div class="container">
    <h1>GetBlok : a playwork for smarter kids</h1>

    <h2>Helpers for translation</h2>

    {{ __('hello') }}

    <h2>
      Message and notification helpers using
      <a href="https://2x.antdv.com/" target="_blank">Antd</a>
    </h2>

    <div>
      <a-button @click="() => $message.info('Test')">Message</a-button>
      <a-button
        @click="() => $notification.open({ message: 'Notification Title' })"
        >Notification
      </a-button>
    </div>

    <div v-if="$config">
      <h2>Accessing Config via a smart getter/setter :</h2>
      {{ $config.get('api.url') }}
    </div>

    <h2>Make an api call</h2>

    <code>
      this.$api.get('posts')
    </code>
    <a-spin :spinning="loading" />
    <ul>
      <li v-bind:key="key" v-for="(post, key) in posts">{{ post.title }}</li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      posts: [],
      loading: true,
    };
  },
  mounted() {
    this.fetchAll();
  },
  methods: {
    fetchAll() {
      this.$api.get('posts').then(res => {
        this.loading = false;
        this.posts = res.data;
      });
    },
  },
};
</script>

<style scoped>
.container {
  padding: 2em;
  max-width: 700px;
  margin: auto;
}
</style>
````

## How to test or contribute

Feel free to add your issues or suggestion in .

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Lints and fixes files
```
npm run lint
```

---
_Source: https://npm.io/package/@cherrypulp/vue-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
