npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tenrok/vue-cron-editor-bootstrap

v0.3.0

Published

[![Version](https://img.shields.io/npm/v/@tenrok/vue-cron-editor-bootstrap.svg)](https://www.npmjs.com/package/@tenrok/vue-cron-editor-bootstrap) [![License](https://img.shields.io/npm/l/@tenrok/vue-cron-editor-bootstrap.svg)](https://github.com/tenrok/vu

Downloads

5

Readme

vue-cron-editor-bootstrap

Version License Vue.js GitHub last commit Downloads Demo

VueCronEditor is a component library built with Vue and Bootstrap-Vue allowing for easier editing of cron expressions. Inspired by https://github.com/karoletrych/vue-cron-editor

Requirements

  • Vue ^2.0
  • Bootstrap-Vue ^2.23.1

Quickstart

Install using

npm install @tenrok/vue-cron-editor-bootstrap --save

Then, initalize the plugin in the starting point of your app (most likely src/main.js):

// main.js
import { Plugin } from '@tenrok/vue-cron-editor-bootstrap'
Vue.use(Plugin)

The components will be registered globally and you can use them immediately.

You can also import individual components into .vue SFC (Single File Component):

<!-- Vue component (.vue) -->
<template>
  <VueCronEditor v-model="cronExpression" />
  {{cronExpression}}
</template>

<script>
  import VueCronEditor from '@tenrok/vue-cron-editor-bootstrap'

  export default {
    name: 'App',
    components: {
      VueCronEditor,
    },
    data() {
      return {
        cronExpression: '*/1 * * * *',
      }
    },
  }
</script>

The editor tab will be set to the one which is able to represent an initial expression given to a value prop (minutes tab in the example above). If none of the tabs can represent the given expression then advanced tab is selected.

To hide the advanced tab, set the isAdvancedTabVisible prop to false. To preserve expression on switch to advanced tab set the preserveStateOnSwitchToAdvanced to true.

i18n

The language of the component can be selected with the locale prop.

<VueCronEditor v-model="expression" locale="pl" />

Currently supported languages:

  • en
  • pl

Custom locales can be provided via a customLocales prop:

<VueCronEditor
  v-model="expression"
  locale="test"
  :custom-locales="{
    test: {
      every: "Every",
      mminutes: "minute(s)",
      hoursOnMinute: "hour(s) on minute",
      daysAt: "day(s) at",
      at: "at",
      onThe: "On the",
      dayOfEvery: "day, of every",
      monthsAt: "month(s), at",
      mon: "Mon",
      tue: "Tue",
      wed: "Wed",
      thu: "Thu",
      fri: "Fri",
      sat: "Sat",
      sun: "Sun",
      minutes: "MINUTES",
      hourly: "HOURLY",
      daily: "DAILY",
      weekly: "WEEKLY",
      monthly: "MONTHLY",
      advanced: "ADVANCED",
      cronExpression: "cron expression:",
      onlyOn: "Only on"
    }
  }"
/>

Contributing

To build the samples app run in root directory:

npm install
npm run serve