-
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve standalone version indicator
- Loading branch information
1 parent
8f8bb85
commit e874067
Showing
2 changed files
with
5 additions
and
4 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,7 +1,8 @@ | ||
module.exports = () => { | ||
if (process.env.STANDALONE) { | ||
const now = new Date(); | ||
return `export default ${JSON.stringify(`${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`)};`; | ||
const dateString = `${now.getFullYear()}-${(now.getMonth() + 1).toString().padStart(2, '0')}-${now.getDate().toString().padStart(2, '0')}`; | ||
return `export default ${JSON.stringify(`Standalone version (${dateString})`)}`; | ||
} | ||
return `export default null;`; | ||
}; |
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