The project has moved to https://github.com/ax2inc/nuxt-modules/tree/master/packages/dayjs
Day.js integration for Nuxt
Integrate Day.js with your Nuxt project.
- Install the module with your favorite package manager.
yarn add @ax2/dayjs-module
# Or npm i @ax2/dayjs-module
- Add
dayjs-module
tomodules
section ofnuxt.config.js
.
// nuxt.config.js
{
modules: [
'@ax2/dayjs-module',
],
}
- Configure the module as needed by adding a
dayjs
key tonuxt.config.js
.
// nuxt.config.js
{
dayjs: {
// Module options
}
}
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>
- Clone this repository
- Install dependencies using
yarn install
ornpm install
- Start development server using
npm run dev
Copyright (c) Ax2 Inc.