Coder Social home page Coder Social logo

vue-beam's Introduction

Build codecov Maintainability

Vue Beam

An event bus for Vue. Built using @crishellco/beam.

Getting Started

Install Package

yarn add @crishellco/vue-beam
# or
npm i @crishellco/vue-beam

Add The Plugin To Your App

import Vue from 'vue';
import VueBeam from '@crishellco/vue-beam';


Vue.use(VueBeam);

Alternatively, Include As a Nuxt Module

// nuxt.config.js
{
  modules: ['@crishellco/vue-beam/nuxt'];
}

Usage

In Vue Component

<template>
  <button @click="$beam.emit('submitted')">Submit</button>
</template>

// In a different component...
<script>
export default {
  mounted() {
    this.$beam.on('submitted', handleSubmit);
  },

  beforeDestroy() {
    this.$beam.off('submitted', handleSubmit);
  }
};
</script>

Outside Of A Vue Component

import { beam } from '@crishellco/vue-beam';

const bus = beam();

bus.emit('submitted');

API

See the @crishellco/beam docs for available methods and properties on $vm.$beam.

Development

Build Dist

yarn build

Test

yarn test

How to Contribute

Pull Requests

  1. Fork the repository
  2. Create a new branch for each feature or improvement
  3. Send a pull request from each feature branch to the develop branch

License

MIT

vue-beam's People

Contributors

crishellco avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

vue-beam's Issues

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm babel-eslint Available

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency core-js to v3.38.0
  • chore(deps): update dependency eslint-plugin-prettier to v5.2.1
  • chore(deps): update dependency eslint-plugin-vue to v9.27.0
  • chore(deps): update dependency npm-run-all2 to v6.2.2
  • chore(deps): update dependency prettier to v3.3.3
  • chore(deps): update dependency eslint-plugin-jest to v28
  • πŸ” Create all rate-limited PRs at once πŸ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/build.yml
  • actions/checkout v3
  • actions/setup-node v3
  • codecov/codecov-action v3
npm
package.json
  • @crishellco/beam ^1.1.0
  • @commitlint/cli 17.8.1
  • @form8ion/commitlint-config 1.0.58
  • @vue/cli-plugin-babel 4.5.19
  • @vue/cli-plugin-eslint 4.5.19
  • @vue/cli-plugin-unit-jest 4.5.19
  • @vue/cli-service 4.5.19
  • @vue/eslint-config-prettier 9.0.0
  • @vue/test-utils 1.3.6
  • babel-eslint 10.1.0
  • core-js 3.37.0
  • cz-conventional-changelog 3.3.0
  • eslint 7.32.0
  • eslint-plugin-jest 27.9.0
  • eslint-plugin-jest-formatting 3.1.0
  • eslint-plugin-prettier 5.1.3
  • eslint-plugin-vue 9.26.0
  • husky 8.0.3
  • js-beautify 1.15.1
  • lint-staged 14.0.1
  • microbundle 0.15.1
  • npm-run-all2 6.1.2
  • prettier 3.2.5
  • semantic-release 19.0.5
  • vue 2.7.16
  • vue-template-compiler 2.7.16
  • vue ^2.6.11
nvm
.nvmrc
  • node 16

  • Check this box to trigger a request for Renovate to run again on this repository

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.