nuxt-clockify
v0.1.3
Published
My new Nuxt module
Readme
nuxt-clockify
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
- Add
nuxt-clockifydependency 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- Add
nuxt-clockifyto themodulessection ofnuxt.config.ts
export default defineNuxtConfig({
modules: ["nuxt-clockify"],
});- create
.envfrom.env.example
cp .env.example .env- add your api token to the field
NUXT_CLOCKIFY_APIin the.env
NUXT_CLOCKIFY_API=token- last thing you need to do is add this in the
nuxt.config.tsin theruntimeConfig
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();