Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D2M #510

Merged
merged 25 commits into from
Feb 24, 2019
Merged

D2M #510

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8ede9b7
docs: prettier docs
iamkun Feb 14, 2019
56050c2
fix: Word orders corrections for locale 'fa' (#491)
majidmadadi Feb 14, 2019
4523275
fix: Update declaration file .diff .isBefore .isSame .isAfter (#496)
huihuimoe Feb 18, 2019
d4cd3ad
chore: Refactor parseDate (#487)
suspectpart Feb 18, 2019
4accf0e
docs: Fix doc error in format escaping with curly brackets (#502)
denis-sokolov Feb 19, 2019
b43decf
docs: Fix doc format escape error
iamkun Feb 19, 2019
ac7d6a7
docs: Fix typo README-pt-br.md (#503)
waghcwb Feb 21, 2019
a55aab9
chore: Update issue templates
iamkun Feb 21, 2019
35e268a
chore: update bug-report.md
iamkun Feb 21, 2019
361d437
fix: Add plugin type definitions (#418)
ypresto Feb 23, 2019
4fcc2ec
chore: rm ts test temporary
iamkun Feb 23, 2019
1b9287f
test: add plugin declaration exist test
iamkun Feb 23, 2019
e72f71e
build: switch to ncp
iamkun Feb 23, 2019
bc4383e
chore: Update index.d.ts
iamkun Feb 23, 2019
8480919
chore: update d.ts
iamkun Feb 23, 2019
44e9680
chore: update isBetween.d.ts
iamkun Feb 23, 2019
f343206
fix: Parse month string 'MMMM MMM (February, Feb)' in customParseForm…
Kreozot Feb 23, 2019
e868095
test: remove useless test
iamkun Feb 23, 2019
bbc2ed7
docs: update customParseFormat docs
iamkun Feb 23, 2019
a0a97ff
refactor: update customParseFormat, allow parse locale from argument
iamkun Feb 23, 2019
6b555bf
docs: update docs customParseFormat
iamkun Feb 23, 2019
9815467
build: update locale import path in esm
iamkun Feb 23, 2019
b9cee84
fix: Add Swahili locale (#508)
ObiWycliffe Feb 24, 2019
1e4bc66
chore: swahili version (#509)
Tracyterry Feb 24, 2019
2ae6207
chore: update sw locale
iamkun Feb 24, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/--bug-report.md
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]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ coverage
/plugin
dayjs.min.js
/esm
index.d.ts

#dev
demo.js
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ coverage
# dev
src
test
types
build
.babelrc
.eslintrc.json
Expand All @@ -25,4 +26,4 @@ docs

#other
.travis.yml
karma.sauce.conf.js
karma.sauce.conf.js
40 changes: 20 additions & 20 deletions .babelrc → babel.config.js
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
}
]
]
}
}
};
21 changes: 21 additions & 0 deletions build/esm.js
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
}
})()
5 changes: 5 additions & 0 deletions build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const configFactory = require('./rollup.config')
const fs = require('fs')
const util = require('util')
const path = require('path')
const { ncp } = require('ncp')

const { promisify } = util

Expand Down Expand Up @@ -39,6 +40,10 @@ async function build(option) {
input: './src/index.js',
fileName: './dayjs.min.js'
}))

ncp('./types/', './', (err) => {
if (err) { throw err }
})
} catch (e) {
console.error(e) // eslint-disable-line no-console
}
Expand Down
Loading