-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update node-modules example to use moment
Moment is used instead of date-fns because date-fns doesn't bundle the main script.
- Loading branch information
Hyunje Jun
committed
Jun 4, 2018
1 parent
3a6a83b
commit 2187739
Showing
6 changed files
with
11 additions
and
18 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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import { currentDate as currentDate1 } from "./module1"; | ||
import { currentDate as currentDate2 } from "./module2"; | ||
import { currentDate } from "./module"; | ||
|
||
console.log(currentDate1()); | ||
console.log(currentDate2()); | ||
console.log(currentDate()); |
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,5 @@ | ||
import * as moment from "moment"; | ||
|
||
export function currentDate(): string { | ||
return moment().format('[Today is a] dddd'); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -24,6 +24,6 @@ | |
"typescript": "^2.9.1" | ||
}, | ||
"devDependencies": { | ||
"date-fns": "^1.29.0" | ||
"moment": "^2.22.2" | ||
} | ||
} |
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