nuxt-clockify
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

nuxt-clockify

npm version npm downloads License

new clockify module for nuxt. NOT PRODUCTION READY!
based on clockify-ts (I only use its return types for now)

Features

  • Can get time entries
  • Can get current user

Quick Setup

  1. Add nuxt-clockify dependency to your project
# Using pnpm
pnpm add -D nuxt-clockify

# Using yarn
yarn add --dev nuxt-clockify

# Using npm
npm install --save-dev nuxt-clockify
  1. Add nuxt-clockify to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: ["nuxt-clockify"],
});
  1. create .env from .env.example
cp .env.example .env
  1. add your api token to the field NUXT_CLOCKIFY_API in the .env
NUXT_CLOCKIFY_API=token
  1. last thing you need to do is add this in the nuxt.config.ts in the runtimeConfig
 clockifyApi: "",

That's it! You can now use nuxt-clockify in your Nuxt app

Development

import { useClockify, useClockifyDurationToHours } from "#clockify";
//get clockify class to work with
const clockify = useClockify();

//getting time entries
const timeEntryResponse = await clockify.timeEntries();

Readme

Keywords

none

Package Sidebar

Install

npm i nuxt-clockify

Weekly Downloads

2

Version

0.1.3

License

MIT

Unpacked Size

9.36 kB

Total Files

18

Last publish

Collaborators

  • tmbl-dev