-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update miscellaneous parts of the source to reasonably modern …
…language alternatives, remove polyfills, improve some JSDoc comments, remove traces of IE BREAKING: In a minority of cases syntax updates may break apps running in very old browsers (such as Internet Explorer), or apps that build Docsify in a custom way with old build tools. To upgrade, build Docsify for older browsers in a custom way, or update existing build tools to handle newer syntax. DEPRECATED: `$docsify.themeColor` is deprecated and will be eventually removed, use a `--theme-color` CSS variable in your style sheet.
- Loading branch information
Showing
73 changed files
with
514 additions
and
592 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
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
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,17 +1,17 @@ | ||
import fs from 'fs'; | ||
import { relative } from './util.js'; | ||
var read = fs.readFileSync; | ||
var write = fs.writeFileSync; | ||
const read = fs.readFileSync; | ||
const write = fs.writeFileSync; | ||
const pkgPath = relative(import.meta, '..', 'package.json'); | ||
const pkg = JSON.parse(read(pkgPath).toString()); | ||
var version = process.env.VERSION || pkg.version; | ||
const version = process.env.VERSION || pkg.version; | ||
|
||
var file = relative(import.meta, '..', 'docs', '_coverpage.md'); | ||
var cover = read(file, 'utf8').toString(); | ||
const file = relative(import.meta, '..', 'docs', '_coverpage.md'); | ||
let cover = read(file, 'utf8').toString(); | ||
|
||
console.log('Replace version number in cover page...'); | ||
cover = cover.replace( | ||
/<small>(\S+)?<\/small>/g, | ||
'<small>' + version + '</small>' | ||
/* html */ `<small>${version}</small>` | ||
); | ||
write(file, cover); |
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
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,16 +1,16 @@ | ||
import fetch from 'fetch' | ||
import fetch from 'fetch'; | ||
|
||
const URL = 'https://example.com' | ||
const PORT = 8080 | ||
const URL = 'https://example.com'; | ||
const PORT = 8080; | ||
|
||
/// [demo] | ||
const result = fetch(`${URL}:${PORT}`) | ||
.then(function (response) { | ||
return response.json() | ||
}) | ||
.then(function (myJson) { | ||
console.log(JSON.stringify(myJson)) | ||
.then(response => { | ||
return response.json(); | ||
}) | ||
.then(myJson => { | ||
console.log(JSON.stringify(myJson)); | ||
}); | ||
/// [demo] | ||
|
||
result.then(console.log).catch(console.error) | ||
result.then(console.log).catch(console.error); |
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
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.