-
-
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.
Merge pull request #2106 from docsifyjs/es-modules
conversion to ESM, and deletion of CommonJS
- Loading branch information
Showing
91 changed files
with
1,152 additions
and
961 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.eslintignore | ||
.eslintrc | ||
.eslintrc.cjs | ||
.github | ||
.gitignore | ||
.travis.yml |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"singleQuote": 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
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 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "current" | ||
} | ||
} | ||
] | ||
] | ||
} |
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,14 +1,17 @@ | ||
var fs = require('fs') | ||
var read = fs.readFileSync | ||
var write = fs.writeFileSync | ||
var version = process.env.VERSION || require('../package.json').version | ||
import fs from 'fs'; | ||
import { relative } from './util.js'; | ||
var read = fs.readFileSync; | ||
var write = fs.writeFileSync; | ||
const pkgPath = relative(import.meta, '..', 'package.json'); | ||
const pkg = JSON.parse(read(pkgPath).toString()); | ||
var version = process.env.VERSION || pkg.version; | ||
|
||
var file = __dirname + '/../docs/_coverpage.md' | ||
var cover = read(file, 'utf8').toString() | ||
var file = relative(import.meta, '..', 'docs', '_coverpage.md'); | ||
var cover = read(file, 'utf8').toString(); | ||
|
||
console.log('Replace version number in cover page...') | ||
console.log('Replace version number in cover page...'); | ||
cover = cover.replace( | ||
/<small>(\S+)?<\/small>/g, | ||
'<small>' + version + '</small>' | ||
) | ||
write(file, cover) | ||
); | ||
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import url from 'url'; | ||
import path from 'path'; | ||
|
||
/** Get a new path relative to the current module (pass import.meta). */ | ||
export const relative = (meta, ...to) => | ||
path.resolve(path.dirname(url.fileURLToPath(meta.url)), ...to); |
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.
c2428f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docsify-preview – ./
docsify-preview-git-develop-docsifyjs.vercel.app
docsify-preview.vercel.app
docsify-preview-docsifyjs.vercel.app
docsifyjs.org
www.docsifyjs.org