-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #510 from iamkun/dev
D2M
- Loading branch information
Showing
58 changed files
with
1,753 additions
and
1,203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: "\U0001F4A9Bug report" | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Information** | ||
- Day.js Version [e.g. v1.0.0] | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome 62] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ coverage | |
/plugin | ||
dayjs.min.js | ||
/esm | ||
index.d.ts | ||
|
||
#dev | ||
demo.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
{ | ||
"env": { | ||
"test": { | ||
"presets": [ | ||
"@babel/preset-env" | ||
] | ||
}, | ||
"build": { | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"modules": false, | ||
"loose": true | ||
} | ||
] | ||
] | ||
} | ||
} | ||
} | ||
module.exports = { | ||
"env": { | ||
"test": { | ||
"presets": [ | ||
"@babel/preset-env" | ||
] | ||
}, | ||
"build": { | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"modules": false, | ||
"loose": true | ||
} | ||
] | ||
] | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const fs = require('fs') | ||
const path = require('path') | ||
const util = require('util') | ||
|
||
const { promisify } = util | ||
|
||
const localeDir = path.join(process.env.PWD, 'esm/locale'); | ||
|
||
(async () => { | ||
try { | ||
const readLocaleDir = await promisify(fs.readdir)(localeDir) | ||
readLocaleDir.forEach(async (l) => { | ||
const filePath = path.join(localeDir, l) | ||
const readFile = await promisify(fs.readFile)(filePath, 'utf8') | ||
const result = readFile.replace("'dayjs'", "'../index'") | ||
await promisify(fs.writeFile)(filePath, result, 'utf8') | ||
}) | ||
} catch (e) { | ||
console.error(e) // eslint-disable-line no-console | ||
} | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.