Repository: nuxt-community/dayjs-module
Branch: master
Commit: 5c512e7f409d
Files: 24
Total size: 46.5 KB
Directory structure:
gitextract_kmyqurya/
├── .all-contributorsrc
├── .circleci/
│ └── config.yml
├── .gitignore
├── .npmignore
├── .prettierignore
├── .prettierrc
├── .versionrc.js
├── CHANGELOG.md
├── LICENSE
├── README.md
├── codecov.yml
├── index.d.ts
├── jest.config.js
├── lib/
│ ├── module.js
│ └── plugin.js
├── package.json
├── renovate.json
├── test/
│ ├── fixture/
│ │ ├── nuxt.config.js
│ │ └── pages/
│ │ ├── index.vue
│ │ ├── locale.vue
│ │ └── plugin.vue
│ ├── system/
│ │ └── module.spec.ts
│ └── unit/
│ └── module.spec.ts
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .all-contributorsrc
================================================
{
"projectName": "dayjs-module",
"projectOwner": "nuxt-community",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "potato4d",
"name": "Takuma HANATANI(@potato4d)",
"avatar_url": "https://github.com/potato4d.png",
"profile": "https://potato4d.me",
"contributions": [
"code",
"bug",
"doc",
"example",
"question",
"review"
]
},
{
"login": "bvelastegui",
"name": "Bryan Daniel Velastegui Lucero",
"avatar_url": "https://avatars2.githubusercontent.com/u/16880910?v=4",
"profile": "https://github.com/bvelastegui",
"contributions": [
"code"
]
},
{
"login": "a65162",
"name": "Wei",
"avatar_url": "https://avatars0.githubusercontent.com/u/19729705?v=4",
"profile": "http://resume.a-wei.tw",
"contributions": [
"code"
]
},
{
"login": "kazuemon",
"name": "かずえもん",
"avatar_url": "https://avatars1.githubusercontent.com/u/12812934?v=4",
"profile": "https://kazuemon.me",
"contributions": [
"doc"
]
},
{
"login": "daikiojm",
"name": "Daiki Ojima",
"avatar_url": "https://avatars.githubusercontent.com/u/10055293?v=4",
"profile": "https://daikiojm.me/",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
"skipCi": true
}
================================================
FILE: .circleci/config.yml
================================================
# Generated by create-nuxt-module
version: 2
jobs:
build:
docker:
- image: circleci/node:16.13.1-browsers
working_directory: ~/app
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: NODE_ENV=test yarn test:coverage
- run: yarn codecov
- store_artifacts:
path: ~/app/coverage/lcov-apprt/
================================================
FILE: .gitignore
================================================
.nuxt/
coverage/
node_modules/
dist/
================================================
FILE: .npmignore
================================================
src/
test/
.nuxt/
================================================
FILE: .prettierignore
================================================
.nuxt/
coverage/
dist/
lib/
src/plugin.js
================================================
FILE: .prettierrc
================================================
{
"semi": false,
"singleQuote": true
}
================================================
FILE: .versionrc.js
================================================
module.exports = {
preset: require.resolve('conventional-changelog-conventionalcommits'),
types: [
{ type: 'feat', section: 'Features' },
{ type: 'fix', section: 'Bug Fixes' },
{ type: 'chore', section: 'Chores', hidden: false },
{ type: 'docs', section: 'Document Changes', hidden: false },
{ type: 'refactor', section: 'Refactoring', hidden: false },
{ type: 'test', section: 'Test Improve', hidden: false },
],
}
================================================
FILE: CHANGELOG.md
================================================
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [1.4.1](https://github.com/nuxt-community/dayjs-module/compare/v1.4.0...v1.4.1) (2021-10-07)
### Document Changes
* **readme:** how to add dayjs plugin types ([391994c](https://github.com/nuxt-community/dayjs-module/commit/391994cd14cc9bed8d43529f3950b5593a4de875))
### Chores
* **deps:** update circleci/node docker tag to v10.24.1 ([52796ce](https://github.com/nuxt-community/dayjs-module/commit/52796ce7e4be04ebbbf8dd0f7703a19a058a9092))
* **deps:** update dependency @types/jest to v27 ([cd684b0](https://github.com/nuxt-community/dayjs-module/commit/cd684b022f4326eeb1b46f466a389cc128eb9a01))
* **deps:** update dependency @types/jsdom to v16.2.11 ([01629d7](https://github.com/nuxt-community/dayjs-module/commit/01629d78dba555dc9b502638c0de6369d76ade17))
* **deps:** update dependency @types/jsdom to v16.2.12 ([cf3689b](https://github.com/nuxt-community/dayjs-module/commit/cf3689b05ce3b865ab1b402cf51f3deab7190d96))
* **deps:** update dependency @types/jsdom to v16.2.13 ([365c1d6](https://github.com/nuxt-community/dayjs-module/commit/365c1d64a28697f74bf7082f936749074541f09d))
* **deps:** update dependency @types/node to v10.17.59 ([e7263fd](https://github.com/nuxt-community/dayjs-module/commit/e7263fd69c579cdd84e412e8c4aaddabb8f523fd))
* **deps:** update dependency @types/node to v10.17.60 ([7eda938](https://github.com/nuxt-community/dayjs-module/commit/7eda938089738bd508f56d4e502a4605cac73f83))
* **deps:** update dependency @types/node to v14 ([1008a59](https://github.com/nuxt-community/dayjs-module/commit/1008a59de1f1eb82d83ef68d408854ad7a8b21b5))
* **deps:** update dependency @types/node to v14.17.11 ([0041ab1](https://github.com/nuxt-community/dayjs-module/commit/0041ab1c58441a0f2d6e5c063e02a9d0ec4d7e81))
* **deps:** update dependency @types/node to v14.17.12 ([1d1b2b1](https://github.com/nuxt-community/dayjs-module/commit/1d1b2b141b6c22ef6026746ea8df199651acc626))
* **deps:** update dependency @types/node to v14.17.14 ([aff31fd](https://github.com/nuxt-community/dayjs-module/commit/aff31fd4471b8a02b14875c43416f4d3ba329687))
* **deps:** update dependency @types/node to v14.17.15 ([7b06ca6](https://github.com/nuxt-community/dayjs-module/commit/7b06ca6b5909a7af14cf097c70691bef930566e6))
* **deps:** update dependency @types/node to v14.17.17 ([bd3aa1f](https://github.com/nuxt-community/dayjs-module/commit/bd3aa1f578b58fe864d00b2ed03a3cbf56c97d74))
* **deps:** update dependency @types/node to v14.17.18 ([1e6df6b](https://github.com/nuxt-community/dayjs-module/commit/1e6df6b493859feb025a5d76f2a3fb8f20a6aacf))
* **deps:** update dependency @types/node to v14.17.19 ([04839e5](https://github.com/nuxt-community/dayjs-module/commit/04839e57dff8f8555213fa98e7c9304bac17f3ec))
* **deps:** update dependency @types/node to v14.17.2 ([daf3e71](https://github.com/nuxt-community/dayjs-module/commit/daf3e71a85456e3c659cd289587e46abaae73be8))
* **deps:** update dependency @types/node to v14.17.20 ([97feb90](https://github.com/nuxt-community/dayjs-module/commit/97feb906885eb78af61c32168aae93ab37527b94))
* **deps:** update dependency @types/node to v14.17.3 ([51b1634](https://github.com/nuxt-community/dayjs-module/commit/51b1634afc225042aff5596340c4ea132d3fbbd7))
* **deps:** update dependency @types/node to v14.17.4 ([56092e9](https://github.com/nuxt-community/dayjs-module/commit/56092e94d90cd6bfe7bfd3fa3781620fc247b69a))
* **deps:** update dependency @types/node to v14.17.5 ([d934e35](https://github.com/nuxt-community/dayjs-module/commit/d934e3513cf63efcabf4e3541bdaeb9a7df68574))
* **deps:** update dependency @types/node to v14.17.6 ([8d29cf8](https://github.com/nuxt-community/dayjs-module/commit/8d29cf85c30f4b7cb59f9661bbdb4dadc70965a5))
* **deps:** update dependency @types/node to v14.17.7 ([a408e68](https://github.com/nuxt-community/dayjs-module/commit/a408e685cb70ed730af2a9d5116fc125ce41a88a))
* **deps:** update dependency @types/node to v14.17.9 ([be178c9](https://github.com/nuxt-community/dayjs-module/commit/be178c9f7ae7da8a17973d4737cf4a1591a66c62))
* **deps:** update dependency @types/puppeteer to v5.4.4 ([4b71525](https://github.com/nuxt-community/dayjs-module/commit/4b715257f77db561cb2d72978386ef898964b3e8))
* **deps:** update dependency codecov to v3.8.2 ([282cf6e](https://github.com/nuxt-community/dayjs-module/commit/282cf6e93c84acc8b094244915ed8a7e34af6bee))
* **deps:** update dependency codecov to v3.8.3 ([f24aec9](https://github.com/nuxt-community/dayjs-module/commit/f24aec9d59aaf858453817ba815267b46c46e2d3))
* **deps:** update dependency prettier to v2.3.1 ([5db27f3](https://github.com/nuxt-community/dayjs-module/commit/5db27f37ba00f210c888994fba51d4759494edd8))
* **deps:** update dependency prettier to v2.3.2 ([cbf37b5](https://github.com/nuxt-community/dayjs-module/commit/cbf37b54ff82b922a655305135615bc26d9e5c78))
* **deps:** update dependency standard-version to v9.3.1 ([8a9913a](https://github.com/nuxt-community/dayjs-module/commit/8a9913a98e232294c32ce8e8988118baea761b64))
* **deps:** update dependency ts-jest to v26.5.6 ([d1b821c](https://github.com/nuxt-community/dayjs-module/commit/d1b821c2b0f50fadb0cfee2d9a4477b3ea64150a))
* **deps:** update dependency typescript to v4.3.4 ([8333cc7](https://github.com/nuxt-community/dayjs-module/commit/8333cc7185d5bafb202c473a1ebcdbed2f098ee4))
* **deps:** update dependency typescript to v4.3.5 ([05db476](https://github.com/nuxt-community/dayjs-module/commit/05db476723b570aebc8c5b1cc3a998ea2876b9cb))
* **deps:** update minor dependencies ([7d9137b](https://github.com/nuxt-community/dayjs-module/commit/7d9137b2cf08ad8c0b5138c7b0ffb96e4b0ba4d8))
* **deps:** update minor dependencies ([8c7f7b4](https://github.com/nuxt-community/dayjs-module/commit/8c7f7b423c32dca6b797efee6c482e2ad302478a))
* **deps:** update minor dependencies ([5500cee](https://github.com/nuxt-community/dayjs-module/commit/5500cee761b6defe3fbdae7068b8e15c0c84ac02))
* **deps:** update node.js to v15 ([218bc19](https://github.com/nuxt-community/dayjs-module/commit/218bc19a1148807ef08c41555a24c83d7cc61a6b))
* **deps:** update node.js to v16 ([f6339ee](https://github.com/nuxt-community/dayjs-module/commit/f6339ee59a25b00ffb11da54c7152df63552d636))
* **deps:** update nuxtjs monorepo to v2.15.4 ([518b421](https://github.com/nuxt-community/dayjs-module/commit/518b42174ed316960e22f26f02f89c0a64819da3))
* **deps:** update nuxtjs monorepo to v2.15.5 ([af66196](https://github.com/nuxt-community/dayjs-module/commit/af661965c6f08744bb113eec63e6347f686f6dc7))
* **deps:** update nuxtjs monorepo to v2.15.6 ([5b0b6ad](https://github.com/nuxt-community/dayjs-module/commit/5b0b6adcd7bb9a33bc1b03333380beb3eb89dbc3))
* **deps:** update nuxtjs monorepo to v2.15.7 ([e2fd63b](https://github.com/nuxt-community/dayjs-module/commit/e2fd63b4973c27ea2cda64b7bc93438278228589))
* **deps:** update nuxtjs monorepo to v2.15.8 ([11a957c](https://github.com/nuxt-community/dayjs-module/commit/11a957ce84672a722e3e197873af17f2f8d10658))
## [1.4.0](https://github.com/nuxt-community/dayjs-module/compare/v1.3.1...v1.4.0) (2021-04-21)
### Bug Fixes
* remove dynamic require for better `vite` support ([4ca06ac](https://github.com/nuxt-community/dayjs-module/commit/4ca06acdcf04bac3d74d9c2697d87733736e10c5))
### Document Changes
* update .all-contributorsrc [skip ci] ([37064f4](https://github.com/nuxt-community/dayjs-module/commit/37064f447a0c2f06ce17ffaaca931189919927d2))
* update README.md [skip ci] ([2e8a10e](https://github.com/nuxt-community/dayjs-module/commit/2e8a10eb4d2088e346b8c5fc7f604357ffb23ca7))
### [1.3.1](https://github.com/nuxt-community/dayjs-module/compare/v1.3.0...v1.3.1) (2021-03-28)
### Bug Fixes
* add types for vuex store ([873530e](https://github.com/nuxt-community/dayjs-module/commit/873530ef2c6b525506958893dec7a80d6f4f61ac))
### Document Changes
* update .all-contributorsrc [skip ci] ([7a9d3cf](https://github.com/nuxt-community/dayjs-module/commit/7a9d3cf2b256c7ba330c071996678b96347b79e5))
* update .all-contributorsrc [skip ci] ([4f65c5a](https://github.com/nuxt-community/dayjs-module/commit/4f65c5aa1ce4aa6862a7f18f89c92a0eaa5a3d92))
* update README.md [skip ci] ([eae3f43](https://github.com/nuxt-community/dayjs-module/commit/eae3f43fda50e9d3451a21b9ad3155441ac8bf29))
* update README.md [skip ci] ([5400dbd](https://github.com/nuxt-community/dayjs-module/commit/5400dbdb22e38d13ff06973203afe677e0b07441))
### Chores
* Update dayjs ([683c9ca](https://github.com/nuxt-community/dayjs-module/commit/683c9ca104f4ba9a9f848f1fde0942fe2a4c15ff))
* **deps:** bump ini from 1.3.5 to 1.3.7 ([6267716](https://github.com/nuxt-community/dayjs-module/commit/62677164ea21e9a0b5c2887b1dce7d3b68285a14))
* **deps:** update circleci/node docker tag to v10.23.1 ([4f162ae](https://github.com/nuxt-community/dayjs-module/commit/4f162ae557f68732437bd4d906caa2e9ff0f02c3))
* **deps:** update circleci/node docker tag to v10.23.2 ([3679d08](https://github.com/nuxt-community/dayjs-module/commit/3679d08fcaa0b71105fbc954eefd09aab74cb0a9))
* **deps:** update circleci/node docker tag to v10.23.3 ([19949e5](https://github.com/nuxt-community/dayjs-module/commit/19949e5f146bae6abfd1a7d460260a910533eedd))
* **deps:** update circleci/node docker tag to v10.24.0 ([b2c30a8](https://github.com/nuxt-community/dayjs-module/commit/b2c30a8e55d1c48b4810b934a6fb61795345b977))
* **deps:** update dependency @types/jsdom to v16.2.6 ([ebbeef1](https://github.com/nuxt-community/dayjs-module/commit/ebbeef1a6fa1fe7e16a5a5684a31cb790378d5b7))
* **deps:** update dependency @types/node to v10.17.50 ([03f89e4](https://github.com/nuxt-community/dayjs-module/commit/03f89e4626a157831133a072a677f48754993c11))
* **deps:** update dependency @types/node to v10.17.51 ([d3a16c5](https://github.com/nuxt-community/dayjs-module/commit/d3a16c5df6cc6b0595bec1f2151c1f4ebad85b65))
* **deps:** update dependency @types/node to v10.17.52 ([42570b0](https://github.com/nuxt-community/dayjs-module/commit/42570b0591a963d1e70e86aa70291f2a7ce6df09))
* **deps:** update dependency @types/puppeteer to v5.4.3 ([4aa8c3a](https://github.com/nuxt-community/dayjs-module/commit/4aa8c3acf8afcd68ff7ae04cadd7e1f50ccdc53d))
* **deps:** update dependency standard-version to v9.1.0 ([c4db6a2](https://github.com/nuxt-community/dayjs-module/commit/c4db6a2b0032f3be96b420939f3aba561e98c909))
* **deps:** update dependency ts-jest to v26.5.0 ([#279](https://github.com/nuxt-community/dayjs-module/issues/279)) ([e0d9c4c](https://github.com/nuxt-community/dayjs-module/commit/e0d9c4c44b0779fb588e8e2d003d3e16c569477b))
* **deps:** update dependency ts-jest to v26.5.1 ([c3dce85](https://github.com/nuxt-community/dayjs-module/commit/c3dce85bb72a228bd759130908dc13705c9cb57d))
* **deps:** update dependency typescript to v4.1.5 ([bef9a2f](https://github.com/nuxt-community/dayjs-module/commit/bef9a2f79859b82ee57ddfa842accee2ad17ea07))
* **deps:** update minor dependencies ([3e4b3ab](https://github.com/nuxt-community/dayjs-module/commit/3e4b3aba7076a356c373278992751406704398e8))
* **deps:** update minor dependencies ([bf294d0](https://github.com/nuxt-community/dayjs-module/commit/bf294d0e484c12034d49eb6487838c527ef6e65c))
* **deps:** update minor dependencies ([676da9d](https://github.com/nuxt-community/dayjs-module/commit/676da9da84810d3d3188ae1ace09b0886aad1404))
* **deps:** update nuxtjs monorepo to v2.15.1 ([ddd4af2](https://github.com/nuxt-community/dayjs-module/commit/ddd4af200eeb122b5edd6f3c9e4a631741a50bbf))
* **deps:** update nuxtjs monorepo to v2.15.2 ([fcfd818](https://github.com/nuxt-community/dayjs-module/commit/fcfd818f0c00e29f4c9f8fbc6f416daaed657d6d))
* **deps:** update nuxtjs monorepo to v2.15.3 ([0fc9b7b](https://github.com/nuxt-community/dayjs-module/commit/0fc9b7b93b77180a3ab5afa9baa32ceda0b53733))
* Change default timezone in readme ([df7218e](https://github.com/nuxt-community/dayjs-module/commit/df7218ef430f46bd3239650ebdeb358a806983e4))
## [1.3.0](https://github.com/nuxt-community/dayjs-module/compare/v1.2.1...v1.3.0) (2020-12-22)
### Features
* add default time zone setting ([d23adfb](https://github.com/nuxt-community/dayjs-module/commit/d23adfbfffc23fa3b72d13ce80322c098d76c82a))
### Chores
* **deps:** update dependency @types/node to v10.17.46 ([8622cee](https://github.com/nuxt-community/dayjs-module/commit/8622ceeaf7b74a2bda6b248cebf60e082d000595))
* **deps:** update dependency @types/node to v10.17.47 ([beb403d](https://github.com/nuxt-community/dayjs-module/commit/beb403d25d0e9005b48ec4a03a58fea30d220f73))
* **deps:** update dependency @types/node to v10.17.48 ([afa6a09](https://github.com/nuxt-community/dayjs-module/commit/afa6a09c047f534d8651336a7d0bb21d6c1caccc))
* **deps:** update dependency @types/node to v10.17.49 ([4a70414](https://github.com/nuxt-community/dayjs-module/commit/4a704140d8e668bcfae82ef4a72b7d3c2c75b388))
* **deps:** update dependency @types/puppeteer to v5.4.1 ([18ad02d](https://github.com/nuxt-community/dayjs-module/commit/18ad02d1e90ae832738325f3b85ae63dfa041c5a))
* **deps:** update dependency @types/puppeteer to v5.4.2 ([df0d9ff](https://github.com/nuxt-community/dayjs-module/commit/df0d9ff37aea7d7c1c43e9cb7bdc2c0ef2faca7c))
* **deps:** update dependency prettier to v2.2.1 ([d1170d5](https://github.com/nuxt-community/dayjs-module/commit/d1170d5529f2aec7787a537be626b5a218808abb))
* **deps:** update dependency typescript to v4.1.3 ([822ca24](https://github.com/nuxt-community/dayjs-module/commit/822ca24689e78f04d4533382cf686d4128a90f68))
* **deps:** update minor dependencies ([987366b](https://github.com/nuxt-community/dayjs-module/commit/987366b696af54bd9a1a4eb36dfc2665e0cdc4c3))
* **deps:** update nuxtjs monorepo to v2.14.11 ([a10f5a5](https://github.com/nuxt-community/dayjs-module/commit/a10f5a54483966613f336fa386cf66702ac54618))
* **deps:** update nuxtjs monorepo to v2.14.12 ([e511f6d](https://github.com/nuxt-community/dayjs-module/commit/e511f6df3de2b16c97c8ddd3d78c6b6655aa1828))
* **deps:** update nuxtjs monorepo to v2.14.9 ([b2e6d37](https://github.com/nuxt-community/dayjs-module/commit/b2e6d3718244f53bd6cc34bc620e7d1b7edcb48a))
### [1.2.1](https://github.com/nuxt-community/dayjs-module/compare/v1.2.0...v1.2.1) (2020-11-19)
### Chores
* **deps:** update circleci/node docker tag to v10.23.0 ([4a6de22](https://github.com/nuxt-community/dayjs-module/commit/4a6de22571b7704fee8aa4e5e7a467dbb94cb206))
* **deps:** update dependency @types/jsdom to v16.2.5 ([10271c9](https://github.com/nuxt-community/dayjs-module/commit/10271c9c474f454b1555a0f1c5cb544ff9d0d3ef))
* **deps:** update dependency @types/node to v10.17.39 ([3a70863](https://github.com/nuxt-community/dayjs-module/commit/3a7086383f2abba74efef3f9758fde53571f5bf1))
* **deps:** update dependency @types/node to v10.17.40 ([acdce77](https://github.com/nuxt-community/dayjs-module/commit/acdce77685659bc258ef091ada6fc197fb157c58))
* **deps:** update dependency @types/node to v10.17.42 ([23c4457](https://github.com/nuxt-community/dayjs-module/commit/23c44572487dd3a024168465ed2b49968fbf5579))
* **deps:** update dependency @types/node to v10.17.44 ([c755e2d](https://github.com/nuxt-community/dayjs-module/commit/c755e2d30a01eb297aaeb7b5fe27cde51b295823))
* **deps:** update dependency @types/puppeteer to v3.0.3 ([8c199df](https://github.com/nuxt-community/dayjs-module/commit/8c199df757d5069e23d334b22e44e17e08ca8873))
* **deps:** update dependency @types/puppeteer to v3.0.4 ([b20f5ee](https://github.com/nuxt-community/dayjs-module/commit/b20f5ee075b4fe9633e0fefa0e2eb3715ffe0f22))
* **deps:** update dependency @types/puppeteer to v3.0.5 ([6836d41](https://github.com/nuxt-community/dayjs-module/commit/6836d41557952ceb1ae5eda55af711c314aa9225))
* **deps:** update dependency @types/puppeteer to v5 ([9782207](https://github.com/nuxt-community/dayjs-module/commit/9782207a7f848e8b4e327c8608236ed74a1de74f))
* **deps:** update dependency all-contributors-cli to v6.17.4 ([b7094ee](https://github.com/nuxt-community/dayjs-module/commit/b7094ee3b7fc9abc369799ab269f89ba8055c6cf))
* **deps:** update dependency all-contributors-cli to v6.18.0 ([2944193](https://github.com/nuxt-community/dayjs-module/commit/294419353108656f7ba326d470f66c3eef59d0b4))
* **deps:** update dependency codecov to v3.8.1 ([4f52d2b](https://github.com/nuxt-community/dayjs-module/commit/4f52d2b09ae5bd7a43ad4d1d71e74dad9d55d3bf))
* **deps:** update dependency puppeteer to v5.3.1 ([b518922](https://github.com/nuxt-community/dayjs-module/commit/b5189221fe4d8da5277d88295b1a225e03eedcdf))
* **deps:** update dependency ts-jest to v26.4.0 ([5060a98](https://github.com/nuxt-community/dayjs-module/commit/5060a98de104b1c8f06917b6c7f50a34c936120e))
* **deps:** update dependency ts-jest to v26.4.1 ([e85dddd](https://github.com/nuxt-community/dayjs-module/commit/e85dddd775be2730b6f15177ace5063f22d7c897))
* **deps:** update dependency ts-jest to v26.4.2 ([e7509ad](https://github.com/nuxt-community/dayjs-module/commit/e7509ad640366f5d7636432bfbed2812424e1e9b))
* **deps:** update dependency ts-jest to v26.4.3 ([02accd1](https://github.com/nuxt-community/dayjs-module/commit/02accd19f806dd35f48065c1972394a2daf242ea))
* **deps:** update dependency ts-jest to v26.4.4 ([2a2cc0d](https://github.com/nuxt-community/dayjs-module/commit/2a2cc0dae67b31bb5062aeaf16af1fe0d96c1bab))
* **deps:** update dependency typescript to v4.0.5 ([a2dfdf3](https://github.com/nuxt-community/dayjs-module/commit/a2dfdf33142e2202f15fc5e1cc9b2cad2f06086d))
* **deps:** update minor dependencies ([c116e65](https://github.com/nuxt-community/dayjs-module/commit/c116e65dc3485311d326146ba8205e3bc0cb6930))
* **deps:** update nuxtjs monorepo to v2.14.6 ([dcd2502](https://github.com/nuxt-community/dayjs-module/commit/dcd25021def31567a1347bf0b03ab6b2cb704f55))
* **deps:** update nuxtjs monorepo to v2.14.7 ([5482eef](https://github.com/nuxt-community/dayjs-module/commit/5482eef6346cf0f94b9703b09b62b1840bd7d935))
## [1.2.0](https://github.com/nuxt-community/dayjs-module/compare/v1.1.12...v1.2.0) (2020-09-19)
### Features
* :sparkles: Add plugin support by @bvelastegui #208
### Document Changes
* update .all-contributorsrc [skip ci] ([904d147](https://github.com/nuxt-community/dayjs-module/commit/904d1479960d010190d92ddd8ce4655ac7ac457d))
* update README.md [skip ci] ([a2ad46f](https://github.com/nuxt-community/dayjs-module/commit/a2ad46f661d9912aa0cf279e74d3bc17f498f8ee))
### [1.1.12](https://github.com/nuxt-community/dayjs-module/compare/v1.1.11...v1.1.12) (2020-09-19)
### Chores
* **deps:** update minor dependencies ([e0e85ae](https://github.com/nuxt-community/dayjs-module/commit/e0e85ae0d36c460c124364d6f442d45b8a469e40))
### [1.1.11](https://github.com/nuxt-community/dayjs-module/compare/v1.1.10...v1.1.11) (2020-09-19)
### Chores
* Grouping deps update ([29f822e](https://github.com/nuxt-community/dayjs-module/commit/29f822e93afe22350b9ed4cfeb29c9a79943935c))
* **deps:** bump bl from 4.0.2 to 4.0.3 ([8c34863](https://github.com/nuxt-community/dayjs-module/commit/8c34863a1b784b1483f95d09a52925b4a00962d0))
* **deps:** bump lodash from 4.17.15 to 4.17.19 ([8d15aa9](https://github.com/nuxt-community/dayjs-module/commit/8d15aa92240cd493b1de19ca6a061412074c99f9))
* **deps:** bump node-fetch from 2.6.0 to 2.6.1 ([25f6803](https://github.com/nuxt-community/dayjs-module/commit/25f6803a606d6950c09b4c1755a96fd3e3c9be45))
* **deps:** update dependency all-contributors-cli to v6.17.3 ([7a79d7d](https://github.com/nuxt-community/dayjs-module/commit/7a79d7d85ac721bd1d6eee43f467fce31e9dcd55))
* **deps:** update dependency prettier to v2.1.2 ([152f6cf](https://github.com/nuxt-community/dayjs-module/commit/152f6cf2d3355800d0219c95e466dfc778e6bdc8))
* **deps:** update dependency standard-version to v9 ([7d827ae](https://github.com/nuxt-community/dayjs-module/commit/7d827aedbceca94d8340915db42106e5e0f75d13))
* **deps:** update dependency typescript to v4 ([5930edd](https://github.com/nuxt-community/dayjs-module/commit/5930edd0425a7b0c48f32a0050b82725bd1e2119))
### Refactoring
* Remove cheerio from dependencies ()[#220](https://github.com/nuxt-community/dayjs-module/issues/220)) ([eaad163](https://github.com/nuxt-community/dayjs-module/commit/eaad163ed5db645ebe52c766c57cc97e2c16a464))
* Remove cheerio from dependencies ([#220](https://github.com/nuxt-community/dayjs-module/issues/220)) ([87718d2](https://github.com/nuxt-community/dayjs-module/commit/87718d232cd66aba8098931108840facc7a3593d))
### [1.1.10](https://github.com/nuxt-community/dayjs-module/compare/v1.1.9...v1.1.10) (2020-09-19)
### Chores
* Add .versionsrc ([2846df4](https://github.com/nuxt-community/dayjs-module/commit/2846df4c04e702c49d6c2679ecda51e63b8567af))
* Update versionrc ([0212dff](https://github.com/nuxt-community/dayjs-module/commit/0212dffc9085f3188a0f43ee2e850ebeebdbb0a4))
* **deps:** bump elliptic from 6.5.1 to 6.5.3 ([b995e6e](https://github.com/nuxt-community/dayjs-module/commit/b995e6e4b6637dbaf5b71ade0bff6233f0500754))
* **deps:** update circleci/node docker tag to v10.22.0 ([d40d1ca](https://github.com/nuxt-community/dayjs-module/commit/d40d1ca8e93bc18c73506e680f04a0c0d2121106))
* **deps:** update circleci/node docker tag to v10.22.1 ([53ec5c7](https://github.com/nuxt-community/dayjs-module/commit/53ec5c79fe0b268862de228fb780550e8795f0d0))
* **deps:** update dependency @nuxt/types to v2 ([8ca421c](https://github.com/nuxt-community/dayjs-module/commit/8ca421cda5e08a79e7cc09900720fbbc7d6ee63d))
* **deps:** update dependency @types/jsdom to v16.2.4 ([6cb1a35](https://github.com/nuxt-community/dayjs-module/commit/6cb1a3559326718c9dae011c7897280275172d05))
* **deps:** update dependency @types/node to v10.17.28 ([dc4d89b](https://github.com/nuxt-community/dayjs-module/commit/dc4d89b2852084c00ce43db36a6264446d07309b))
* **deps:** update dependency @types/node to v10.17.29 ([d9e8eff](https://github.com/nuxt-community/dayjs-module/commit/d9e8effff7f455538f6aba1057a755ed687a537f))
* **deps:** update dependency @types/node to v10.17.32 ([3b48309](https://github.com/nuxt-community/dayjs-module/commit/3b48309a96aa7ff190a96469c75becc4a75b2bc4))
* **deps:** update dependency @types/node to v10.17.35 ([075a09a](https://github.com/nuxt-community/dayjs-module/commit/075a09a222ca273eef28ba92afda6cf9d4673250))
* **deps:** update dependency @types/puppeteer to v3.0.2 ([091611b](https://github.com/nuxt-community/dayjs-module/commit/091611b271447dbc6ceb7cab076ec98815f104b9))
* **deps:** update dependency codecov to v3.7.1 ([6c7272a](https://github.com/nuxt-community/dayjs-module/commit/6c7272acb659967ee7e6868a995dada1f9fdd278))
* **deps:** update dependency codecov to v3.7.2 ([1c08604](https://github.com/nuxt-community/dayjs-module/commit/1c086044929b8029403b2973409d02e6c5613edc))
* **deps:** update dependency nuxt to v2.13.3 ([2843d97](https://github.com/nuxt-community/dayjs-module/commit/2843d97c39dbed00d9c474750a79c69b46b35603))
* **deps:** update dependency puppeteer to v5 ([6a96d83](https://github.com/nuxt-community/dayjs-module/commit/6a96d834851347f921876d40a931a87df2a86ff3))
* **deps:** update dependency standard-version to v8.0.2 ([8ff3d93](https://github.com/nuxt-community/dayjs-module/commit/8ff3d93aeb072c6ef61b23a501dcc85310a27bcb))
* **deps:** update dependency ts-jest to v26.1.3 ([5557b6e](https://github.com/nuxt-community/dayjs-module/commit/5557b6e24ee985f98c10fd3ee0d1f517582dbe77))
* **deps:** update dependency ts-jest to v26.1.4 ([4296d96](https://github.com/nuxt-community/dayjs-module/commit/4296d960803aca854e9e4609d3c4f5d73f66c782))
* **deps:** update dependency typescript to v3.9.7 ([53e0c1d](https://github.com/nuxt-community/dayjs-module/commit/53e0c1dcadb65a1a74765b73a58573ff976f6c41))
### [1.1.8](https://github.com/nuxt-community/dayjs-module/compare/v0.1.2...v1.1.8) (2020-07-13)
### Features
* **types:** Enhance context types ([9719a17](https://github.com/nuxt-community/dayjs-module/commit/9719a1792e7356b3e26e39b1beeba30516f6a1ca))
* Add locale support option ([046158b](https://github.com/nuxt-community/dayjs-module/commit/046158b3e1761d76fe84a57ad588c0d61e13e308))
## [1.1.0](https://github.com/nuxt-community/dayjs-module/compare/v1.0.0...v1.1.0) (2019-10-25)
### Features
* **types:** Enhance context types ([8110c51](https://github.com/nuxt-community/dayjs-module/commit/8110c51e4ed2a722c21900b8f91c488e9aed61fd))
## [1.0.0](https://github.com/nuxt-community/dayjs-module/compare/v0.1.2...v1.0.0) (2019-10-25)
### Features
* Add locale support option ([6f7b6b6](https://github.com/nuxt-community/dayjs-module/commit/6f7b6b6f19d4faef0080af70ff8e464ca66cf8cd))
## [0.1.1](https://github.com/nuxt-community/dayjs-module/compare/v0.1.0...v0.1.1) (2019-03-07)
### Bug Fixes
* Fix test bug ([b18f558](https://github.com/nuxt-community/dayjs-module/commit/b18f558))
# 0.1.0 (2019-03-07)
### Features
* Implement main function ([856d454](https://github.com/nuxt-community/dayjs-module/commit/856d454))
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2018 Takuma HANATANI(potato4d)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# @nuxtjs/dayjs
[](https://github.com/prettier/prettier)
[](https://www.patreon.com/potato4d)
[](https://opensource.org/licenses/MIT)
[](https://npmjs.com/package/@nuxtjs/dayjs)
[](#contributors)
[](https://npmjs.com/package/@nuxtjs/dayjs)
[](https://codecov.io/gh/nuxt-community/dayjs-module)
> The best way to use Day.js easily in your Nuxt 2 project.
Looking for a Nuxt 3 alternative? Try out:
- https://github.com/nathanchase/dayjs
- https://github.com/fumeapp/dayjs
<a href="https://patreon.com/potato4d">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" height="50">
</a>
## Installation
```bash
$ yarn add @nuxtjs/dayjs # or npm install
```
## Usage
### 1. Register dayjs module to your Nuxt Application
```js
export default {
// ...
modules: [
'@nuxtjs/dayjs'
],
// Optional
dayjs: {
locales: ['en', 'ja'],
defaultLocale: 'en',
defaultTimeZone: 'Asia/Tokyo',
plugins: [
'utc', // import 'dayjs/plugin/utc'
'timezone' // import 'dayjs/plugin/timezone'
] // Your Day.js plugin
}
// ...
}
```
### 2. Use $dayjs on Context, Vue instance
with Context
```html
<script>
export default {
asyncData({ $dayjs }) {
return {
now: $dayjs().format('YYYY/MM/DD')
}
}
}
</script>
```
with Vue instance
```html
<script>
export default {
data() {
return {
latestClicked: null
}
},
methods: {
handleClickButton() {
this.latestClicked = this.$dayjs().format('YYYY/MM/DD')
}
}
}
</script>
```
### For Typescript users
Add the types to your `"types"` array in `tsconfig.json` after the `@nuxt/types` entry.
For dayjs plugins, add their relative types like `dayjs/plugin/_pluginName_`.
#### tsconfig.json
```json
{
"compilerOptions": {
"types": [
"@nuxt/types",
"@nuxtjs/dayjs",
"dayjs/plugin/relativeTime",
]
}
}
```
## Development
```bash
$ git clone https://github.com/nuxt-community/dayjs-module.git
$ cd @nuxtjs/dayjs
$ yarn
```
## License
MIT @potato4d
## Note
This project generated by [create-nuxt-module](https://github.com/potato4d/create-nuxt-module)
## Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://potato4d.me"><img src="https://github.com/potato4d.png?s=100" width="100px;" alt=""/><br /><sub><b>Takuma HANATANI(@potato4d)</b></sub></a><br /><a href="https://github.com/nuxt-community/dayjs-module/commits?author=potato4d" title="Code">💻</a> <a href="https://github.com/nuxt-community/dayjs-module/issues?q=author%3Apotato4d" title="Bug reports">🐛</a> <a href="https://github.com/nuxt-community/dayjs-module/commits?author=potato4d" title="Documentation">📖</a> <a href="#example-potato4d" title="Examples">💡</a> <a href="#question-potato4d" title="Answering Questions">💬</a> <a href="https://github.com/nuxt-community/dayjs-module/pulls?q=is%3Apr+reviewed-by%3Apotato4d" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/bvelastegui"><img src="https://avatars2.githubusercontent.com/u/16880910?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bryan Daniel Velastegui Lucero</b></sub></a><br /><a href="https://github.com/nuxt-community/dayjs-module/commits?author=bvelastegui" title="Code">💻</a></td>
<td align="center"><a href="http://resume.a-wei.tw"><img src="https://avatars0.githubusercontent.com/u/19729705?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Wei</b></sub></a><br /><a href="https://github.com/nuxt-community/dayjs-module/commits?author=a65162" title="Code">💻</a></td>
<td align="center"><a href="https://kazuemon.me"><img src="https://avatars1.githubusercontent.com/u/12812934?v=4?s=100" width="100px;" alt=""/><br /><sub><b>かずえもん</b></sub></a><br /><a href="https://github.com/nuxt-community/dayjs-module/commits?author=kazuemon" title="Documentation">📖</a></td>
<td align="center"><a href="https://daikiojm.me/"><img src="https://avatars.githubusercontent.com/u/10055293?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Daiki Ojima</b></sub></a><br /><a href="https://github.com/nuxt-community/dayjs-module/commits?author=daikiojm" title="Code">💻</a></td>
</tr>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
================================================
FILE: codecov.yml
================================================
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
require_base: no # [yes :: must have a base report to post]
require_head: yes # [yes :: must have a head report to post]
branches: null
================================================
FILE: index.d.ts
================================================
import Vue from 'vue'
import dayjs from 'dayjs'
declare module '@nuxt/vue-app' {
interface Context {
$dayjs: typeof dayjs
}
interface NuxtAppOptions {
$dayjs: typeof dayjs
}
}
// Nuxt 2.9+
declare module '@nuxt/types' {
interface Context {
$dayjs: typeof dayjs
}
interface NuxtAppOptions {
$dayjs: typeof dayjs
}
}
declare module 'vue/types/vue' {
interface Vue {
$dayjs: typeof dayjs
}
}
declare module 'vuex/types/index' {
interface Store<S> {
$dayjs: typeof dayjs
}
}
================================================
FILE: jest.config.js
================================================
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
collectCoverageFrom: ['./src/**/*.ts'],
}
================================================
FILE: lib/module.js
================================================
const { resolve } = require('path')
function dayjsModule(moduleOptions) {
moduleOptions = moduleOptions || {}
this.options.dayjs = this.options.dayjs || {}
const options = {
locales: [
...(this.options.dayjs.locales || []),
...(moduleOptions.locales || []),
],
defaultLocale: (
moduleOptions.defaultLocale ||
this.options.dayjs.defaultLocale ||
null
),
plugins: [
...(this.options.dayjs.plugins || []),
...(moduleOptions.plugins || []),
],
defaultTimeZone: (
moduleOptions.defaultTimeZone ||
this.options.dayjs.defaultTimeZone ||
null
)
}
this.addPlugin({
src: resolve(__dirname, 'plugin.js'),
fileName: 'dayjs-plugin.js',
options
})
}
module.exports = dayjsModule
module.exports.meta = require('../package.json')
================================================
FILE: lib/plugin.js
================================================
import dayjs from 'dayjs'
<%= options.locales.map(l => `import 'dayjs/locale/${l}'`).join('\n') %>
<%= options.plugins.map(l => `import ${l.replace(/[^A-Za-z]/g, '_')} from 'dayjs/plugin/${l}'`).join('\n') %>
<%= options.plugins.map(l => `dayjs.extend(${l.replace(/[^A-Za-z]/g, '_')})`).join('\n') %>
<% if (options.defaultLocale) { %>
dayjs.locale('<%= options.defaultLocale %>')
<% } %>
<% if (options.defaultTimeZone) { %>
dayjs.tz.setDefault('<%= options.defaultTimeZone %>')
<% } %>
export default (context, inject) => {
context.$dayjs = dayjs
inject('dayjs', dayjs)
}
================================================
FILE: package.json
================================================
{
"name": "@nuxtjs/dayjs",
"version": "1.4.1",
"description": "The best way for use Day.js easily in your Nuxt.js project.",
"author": {
"name": "Takuma HANATANI(potato4d)"
},
"keywords": [
"vue",
"nuxt",
"nuxt.js"
],
"main": "lib/module.js",
"types": "index.d.ts",
"license": "MIT",
"repository": "https://github.com/nuxt-community/dayjs-module",
"scripts": {
"dev": "nuxt test/fixture",
"test": "NODE_ENV=test jest",
"test:system": "NODE_ENV=test jest --testRegex \"/test/system/(.+)\\.test\\.js$\"",
"test:coverage": "NODE_ENV=test yarn test --coverage",
"format": "prettier './**/*.{js,ts,json,vue}' --write"
},
"devDependencies": {
"@nuxt/types": "2.15.8",
"@nuxtjs/module-test-utils": "1.6.3",
"@types/consola": "1.0.0",
"@types/jest": "27.5.2",
"@types/jsdom": "21.1.7",
"@types/node": "16.18.126",
"@types/puppeteer": "5.4.7",
"all-contributors-cli": "6.24.0",
"codecov": "3.8.3",
"jest": "27.5.1",
"nuxt": "2.16.3",
"prettier": "2.8.8",
"puppeteer": "15.5.0",
"standard-version": "9.5.0",
"ts-jest": "27.1.5",
"typescript": "5.0.4"
},
"jest": {
"testEnvironment": "node",
"collectCoverageFrom": [
"lib/**/*.{js,jsx}"
]
},
"dependencies": {
"consola": "^2.10.1",
"dayjs": "^1.10.4"
}
}
================================================
FILE: renovate.json
================================================
{
"extends": ["config:base"],
"schedule": ["every weekend"],
"patch": {
"automerge": true
},
"minor": {
"groupName": "minor dependencies"
}
}
================================================
FILE: test/fixture/nuxt.config.js
================================================
const resolve = require('path').resolve
module.exports = {
rootDir: resolve(__dirname, '../..'),
srcDir: __dirname,
modules: ['~/../../lib/module.js'],
dev: process.env.NODE_ENV !== 'test' && process.env.NODE_ENV === 'production',
dayjs: {
locales: ['ja'],
plugins: ['advancedFormat', 'localizedFormat'],
},
}
================================================
FILE: test/fixture/pages/index.vue
================================================
<template>
<div>
<p data-test-id="birthday">{{ myBirthDay }}</p>
<button type="button" @click="handleChangeBirthDayToBro">
change birthday
</button>
</div>
</template>
<script>
export default {
asyncData(context) {
return {
myBirthDay: context.$dayjs('1998-04-13').format('YYYY/MM/DD'),
}
},
methods: {
handleChangeBirthDayToBro() {
this.myBirthDay = this.$dayjs('1995-12-18').format('YYYY/MM/DD')
},
},
}
</script>
================================================
FILE: test/fixture/pages/locale.vue
================================================
<template>
<div>
<p data-test-id="birthday">{{ myBirthDay }}</p>
<button type="button" @click="handleChangeBirthDayToBro">
change birthday
</button>
</div>
</template>
<script>
export default {
asyncData(context) {
return {
myBirthDay: context
.$dayjs('1998-04-13')
.locale('ja')
.format('YYYY/MM/DD(dddd)'),
}
},
methods: {
handleChangeBirthDayToBro() {
this.myBirthDay = this.$dayjs('1995-12-18')
.locale('ja')
.format('YYYY/MM/DD(dddd)')
},
},
}
</script>
================================================
FILE: test/fixture/pages/plugin.vue
================================================
<template>
<div>
<p data-test-id="advancedFormat">{{ advancedFormat }}</p>
<p data-test-id="localized">{{ localized }}</p>
</div>
</template>
<script>
export default {
asyncData(context) {
return {
advancedFormat: context.$dayjs('2018-08-16').format('Do'),
localized: context.$dayjs('2018-08-16').format('ll'),
}
},
}
</script>
================================================
FILE: test/system/module.spec.ts
================================================
import path from 'path'
import puppeteer from 'puppeteer'
const { setup, loadConfig } = require('@nuxtjs/module-test-utils')
const url = (path: string) => `http://localhost:3000${path}`
jest.setTimeout(10000)
describe('basic', () => {
let nuxt: any
let page: puppeteer.Page
let browser: puppeteer.Browser
beforeAll(async () => {
const createBrowser = async () => {
browser = await puppeteer.launch({
args: ['--no-sandbox'],
headless: process.env.NODE_ENV !== 'development',
timeout: 0,
})
page = await browser.newPage()
}
;[{ nuxt }] = await Promise.all([
setup(loadConfig(path.resolve(__dirname, '../')), {
port: 3000,
}),
createBrowser(),
])
}, 60000)
afterAll(async () => {
await nuxt.close()
await browser.close()
})
test('can use Day.js', async () => {
expect.assertions(2)
await page.goto(url('/'))
const el = await page.$('[data-test-id="birthday"]')
const textContent = await el!.getProperty('textContent')
const value = await textContent.jsonValue()
expect(value).toBe('1998/04/13')
const button = await page.$('button')
await button!.click()
const newTextContent = await el!.getProperty('textContent')
const newValue = await newTextContent.jsonValue()
return expect(newValue).toBe('1995/12/18')
})
test('support locale', async () => {
expect.assertions(2)
await page.goto(url('/locale'))
const el = await page.$('[data-test-id="birthday"]')
const textContent = await el!.getProperty('textContent')
const value = await textContent.jsonValue()
expect(value).toBe('1998/04/13(月曜日)')
const button = await page.$('button')
await button!.click()
const newTextContent = await el!.getProperty('textContent')
const newValue = await newTextContent.jsonValue()
return expect(newValue).toBe('1995/12/18(月曜日)')
})
test('support plugins', async () => {
expect.assertions(2)
await page.goto(url('/plugin'))
const el = await page.$('[data-test-id="advancedFormat"]')
const textContent = await el!.getProperty('textContent')
const value = await textContent.jsonValue()
expect(value).toBe('16th')
const el1 = await page.$('[data-test-id="localized"]')
const textContent1 = await el1!.getProperty('textContent')
const value1 = await textContent1.jsonValue()
return expect(value1).toBe('Aug 16, 2018')
})
})
================================================
FILE: test/unit/module.spec.ts
================================================
describe('module.ts', () => {
describe('sample', () => {
it('should returns true', () => {
expect(true).toBe(true)
})
})
})
================================================
FILE: tsconfig.json
================================================
{
"compilerOptions": {
/* Basic Options */
"target": "es2015" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"lib": [
"esnext"
] /* Specify library files to be included in the compilation. */,
"allowJs": true /* Allow javascript files to be compiled. */,
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./lib" /* Redirect output structure to the directory. */,
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
// "composite": true, /* Enable project compilation */
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */
"strict": true /* Enable all strict type-checking options. */,
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
/* Additional Checks */
// "noUnusedLocals": true, /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
"types": [
"node",
"jest"
] /* Type declaration files to be included in compilation. */,
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
/* Source Map Options */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
},
"include": ["src/**/*"]
}
gitextract_kmyqurya/ ├── .all-contributorsrc ├── .circleci/ │ └── config.yml ├── .gitignore ├── .npmignore ├── .prettierignore ├── .prettierrc ├── .versionrc.js ├── CHANGELOG.md ├── LICENSE ├── README.md ├── codecov.yml ├── index.d.ts ├── jest.config.js ├── lib/ │ ├── module.js │ └── plugin.js ├── package.json ├── renovate.json ├── test/ │ ├── fixture/ │ │ ├── nuxt.config.js │ │ └── pages/ │ │ ├── index.vue │ │ ├── locale.vue │ │ └── plugin.vue │ ├── system/ │ │ └── module.spec.ts │ └── unit/ │ └── module.spec.ts └── tsconfig.json
SYMBOL INDEX (7 symbols across 2 files)
FILE: index.d.ts
type Context (line 5) | interface Context {
type NuxtAppOptions (line 8) | interface NuxtAppOptions {
type Context (line 15) | interface Context {
type NuxtAppOptions (line 18) | interface NuxtAppOptions {
type Vue (line 24) | interface Vue {
type Store (line 30) | interface Store<S> {
FILE: lib/module.js
function dayjsModule (line 3) | function dayjsModule(moduleOptions) {
Condensed preview — 24 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (50K chars).
[
{
"path": ".all-contributorsrc",
"chars": 1544,
"preview": "{\n \"projectName\": \"dayjs-module\",\n \"projectOwner\": \"nuxt-community\",\n \"repoType\": \"github\",\n \"repoHost\": \"https://gi"
},
{
"path": ".circleci/config.yml",
"chars": 571,
"preview": "# Generated by create-nuxt-module\nversion: 2\njobs:\n build:\n docker:\n - image: circleci/node:16.13.1-browsers\n\n "
},
{
"path": ".gitignore",
"chars": 37,
"preview": ".nuxt/\ncoverage/\nnode_modules/\ndist/\n"
},
{
"path": ".npmignore",
"chars": 19,
"preview": "src/\ntest/\n.nuxt/\n\n"
},
{
"path": ".prettierignore",
"chars": 42,
"preview": ".nuxt/\ncoverage/\ndist/\nlib/\nsrc/plugin.js\n"
},
{
"path": ".prettierrc",
"chars": 43,
"preview": "{\n \"semi\": false,\n \"singleQuote\": true\n}\n"
},
{
"path": ".versionrc.js",
"chars": 446,
"preview": "module.exports = {\n preset: require.resolve('conventional-changelog-conventionalcommits'),\n types: [\n { type: 'feat"
},
{
"path": "CHANGELOG.md",
"chars": 25037,
"preview": "# Changelog\n\nAll notable changes to this project will be documented in this file. See [standard-version](https://github."
},
{
"path": "LICENSE",
"chars": 1082,
"preview": "MIT License\n\nCopyright (c) 2018 Takuma HANATANI(potato4d)\n\nPermission is hereby granted, free of charge, to any person o"
},
{
"path": "README.md",
"chars": 5266,
"preview": "# @nuxtjs/dayjs\n\n["
},
{
"path": "codecov.yml",
"chars": 301,
"preview": "comment:\n layout: \"reach, diff, flags, files\"\n behavior: default\n require_changes: false # if true: only post the co"
},
{
"path": "index.d.ts",
"chars": 523,
"preview": "import Vue from 'vue'\nimport dayjs from 'dayjs'\n\ndeclare module '@nuxt/vue-app' {\n interface Context {\n $dayjs: type"
},
{
"path": "jest.config.js",
"chars": 111,
"preview": "module.exports = {\n preset: 'ts-jest',\n testEnvironment: 'node',\n collectCoverageFrom: ['./src/**/*.ts'],\n}\n"
},
{
"path": "lib/module.js",
"chars": 833,
"preview": "const { resolve } = require('path')\n\nfunction dayjsModule(moduleOptions) {\n moduleOptions = moduleOptions || {}\n this."
},
{
"path": "lib/plugin.js",
"chars": 583,
"preview": "import dayjs from 'dayjs'\n\n<%= options.locales.map(l => `import 'dayjs/locale/${l}'`).join('\\n') %>\n<%= options.plugins."
},
{
"path": "package.json",
"chars": 1358,
"preview": "{\n \"name\": \"@nuxtjs/dayjs\",\n \"version\": \"1.4.1\",\n \"description\": \"The best way for use Day.js easily in your Nuxt.js "
},
{
"path": "renovate.json",
"chars": 162,
"preview": "{\n \"extends\": [\"config:base\"],\n \"schedule\": [\"every weekend\"],\n \"patch\": {\n \"automerge\": true\n },\n \"minor\": {\n "
},
{
"path": "test/fixture/nuxt.config.js",
"chars": 331,
"preview": "const resolve = require('path').resolve\n\nmodule.exports = {\n rootDir: resolve(__dirname, '../..'),\n srcDir: __dirname,"
},
{
"path": "test/fixture/pages/index.vue",
"chars": 475,
"preview": "<template>\n <div>\n <p data-test-id=\"birthday\">{{ myBirthDay }}</p>\n <button type=\"button\" @click=\"handleChangeBir"
},
{
"path": "test/fixture/pages/locale.vue",
"chars": 558,
"preview": "<template>\n <div>\n <p data-test-id=\"birthday\">{{ myBirthDay }}</p>\n <button type=\"button\" @click=\"handleChangeBir"
},
{
"path": "test/fixture/pages/plugin.vue",
"chars": 364,
"preview": "<template>\n <div>\n <p data-test-id=\"advancedFormat\">{{ advancedFormat }}</p>\n <p data-test-id=\"localized\">{{ loca"
},
{
"path": "test/system/module.spec.ts",
"chars": 2455,
"preview": "import path from 'path'\nimport puppeteer from 'puppeteer'\nconst { setup, loadConfig } = require('@nuxtjs/module-test-uti"
},
{
"path": "test/unit/module.spec.ts",
"chars": 142,
"preview": "describe('module.ts', () => {\n describe('sample', () => {\n it('should returns true', () => {\n expect(true).toBe"
},
{
"path": "tsconfig.json",
"chars": 5308,
"preview": "{\n \"compilerOptions\": {\n /* Basic Options */\n \"target\": \"es2015\" /* Specify ECMAScript target version: 'ES3' (def"
}
]
About this extraction
This page contains the full source code of the nuxt-community/dayjs-module GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 24 files (46.5 KB), approximately 16.1k tokens, and a symbol index with 7 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.