Skip to content
This repository has been archived by the owner on Oct 18, 2018. It is now read-only.

ax2inc/dayjs-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The project has moved to https://github.com/ax2inc/nuxt-modules/tree/master/packages/dayjs

dayjs-module

npm (scoped with tag) npm CircleCI Codecov Dependencies Code Style

Day.js integration for Nuxt

📖 Release Notes

Features

Integrate Day.js with your Nuxt project.

Setup

  • Install the module with your favorite package manager.
yarn add @ax2/dayjs-module
# Or npm i @ax2/dayjs-module
  • Add dayjs-module to modules section of nuxt.config.js.
// nuxt.config.js

{
  modules: [
    '@ax2/dayjs-module',
 ],
}
  • Configure the module as needed by adding a dayjs key to nuxt.config.js.
// nuxt.config.js

{
  dayjs: {
    // Module options
  }
}

Usage

At the moment, all the module does is inject Day.js into Vue instances so you can call it from anywhere in your app:

<template>
  <div>
    {{ $dayjs('2018-09-18').format('dddd, MMMM DD, YYYY') }}
    <!-- Renders: Tuesday, September 18, 2018 -->
  </div>
</template>

Development

  • Clone this repository
  • Install dependencies using yarn install or npm install
  • Start development server using npm run dev

License

MIT License

Copyright (c) Ax2 Inc.

About

Day.js integration for Nuxt

Resources

License

Stars

Watchers

Forks

Packages

No packages published