Skip to content

Commit

Permalink
Ensure code format (#2138)
Browse files Browse the repository at this point in the history
* chore: add missing Vue support for Vercel builds

* refactor: move some functions and module-level state into classes as private methods and properties to start to encapsulate Docsify

Also some small tweaks:

- move initGlobalAPI out of Docsify.js to start to encapsulate Docsify
- move ajax to utils folder
- fix some type definitions and improve content in some JSDoc comments
- use concise class field syntax
- consolidate duplicate docsify-ignore comment removal code

This handles a task in [Simplify and modernize Docsify](#2104), as well as works towards [Encapsulating Docsify](#2135).

* chore: add prettier code format check to our lint script, and add a prettier script for manually formatting the whole code base

* chore: update issue/pr templates

* chore: apply our format to the whole code base


---------

Co-authored-by: Koy <[email protected]>
Co-authored-by: i544693 <[email protected]>
  • Loading branch information
3 people committed Aug 9, 2023
1 parent 6464cf5 commit 7bbf13d
Show file tree
Hide file tree
Showing 51 changed files with 1,217 additions and 1,152 deletions.
51 changes: 30 additions & 21 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,44 1,53 @@
---
name: Bug report
about: Create a report to help us improve

about: Create a report to help us fix an issue
---
<!-- Please don't delete this template or we'll close your issue -->
<!-- Please use English language -->
<!-- Before creating an issue please make sure you are using the latest version of Docsify. -->
<!-- Please ask questions on StackOverflow: https://stackoverflow.com/questions/ask?tags=docsify -->
<!-- Please ask questions on Discord: https://discord.gg/3NwKFyR -->

<!--
Please don't delete this template or we'll close your issue.
Please write in English.
Before creating an issue please make sure you are using the latest version of Docsify.
Please ask questions on StackOverflow (👉 https://stackoverflow.com/questions/ask?tags=docsify)
or in our Discord chat server (👉 https://discord.gg/docsify).
-->

## Bug Report

#### Steps to reproduce

<!-- List the steps needed to reproduce here. -->

#### Current behaviour

<!-- Describe the current behavior here. -->

#### What is current behaviour
#### Expected behaviour

<!-- Describe the expected behavior here. -->

#### Other relevant information

#### What is the expected behaviour
- Docsify version:

<!-- (Change "[ ]" to "[x]" to check a box.) -->

- [ ] Bug still occurs when all/other plugins are disabled?

#### Other relevant information
- Docsify plugins (if the bug happens when plugins enabled, please try to isolate the issue):

<!-- Please provide the following information if relevant to the issue.
<!-- (Update "[ ]" to "[x]" to check a box) -->
- [ ] Bug does still occur when all/other plugins are disabled?
- Your OS:
- Node.js version:
- npm/yarn version:
- Browser version:
- Your OS:
- Node.js version:
- npm/yarn version:
- Browser version:
- Docsify version:
- Docsify plugins:
-->

<!-- Love docsify? Please consider supporting our collective:
👉 https://opencollective.com/docsify/donate -->
<!-- Love docsify and want to help us advance Docsify or to spend time supporting your case? Please consider supporting our collective:
👉 https://opencollective.com/docsify/donate -->

#### Please create a reproducible sandbox
#### Please create a reproducible sandbox

[![Edit 307qqv236](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/307qqv236)

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 1,5 @@
blank_issues_enabled: false
contact_links:
- name: Discord - the community chat
url: https://discord.gg/3NwKFyR
about: Join Discord community and chat about Docsify
url: https://discord.gg/docsify
about: Join the Discord community and chat about Docsify
31 changes: 19 additions & 12 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,25 1,32 @@
---
name: Feature request
about: Suggest an idea for this project

---
<!-- Please don't delete this template or we'll close your issue -->
<!-- Please use English language -->
<!-- Before creating an issue please make sure you are using the latest version of Docsify. -->
<!-- Please ask questions on StackOverflow 👉 https://stackoverflow.com/questions/ask?tags=docsify -->

## Feature request

#### What problem does this feature solve?

<!--
Please don't delete this template or we'll close your issue.
Please write in English.
Before creating an issue please make sure you are using the latest version of Docsify.
Please ask questions on StackOverflow (👉 https://stackoverflow.com/questions/ask?tags=docsify)
or in our Discord chat server (👉 https://discord.gg/docsify).
-->

## Feature request

#### What does the proposed API look like?
#### Problem or desire

<!-- Describe what problem this feature will solve. -->

#### Proposal

#### How should this be implemented in your opinion?
<!-- What does the proposed feature look like? -->

#### Implementation

<!--
How should the feature be implemented in your opinion?
#### Are you willing to work on this yourself?
We have limited free time. Please consider contributing, or donating to our
OpenCollective (👉 https://opencollective.com/docsify/donate), to help get this
feature added and to advance Docsify.
-->
52 changes: 22 additions & 30 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,31 1,25 @@
<!--
PULL REQUEST TEMPLATE
---
Please use English language
Please don't delete this template
---
Update "[ ]" to "[x]" to check a box in any list below.
---
To avoid wasting your time, it's best to open a **feature request issue** first and wait for approval before working on it.
Please write in English.
Please follow the template, all sections are required.
Consider opening a feature request first to get your change idea approved.
-->

## **Summary**
## Summary

<!--
THIS IS REQUIRED! Please describe what the change does and why it should be merged.
Describe what the change does and why it should be merged.
Provide **before/after** screenshots for any UI changes.
-->

<!--
If changing the UI in any way, please provide the a **before/after** screenshot:
-->
## Related issue, if any:

## **What kind of change does this PR introduce?**
<!-- Paste issue's link or number hashtag here. -->

<!--
Copy/paste one of the following options:
-->
## What kind of change does this PR introduce?

<!--
Copy/paste any of the relevant following options:
Bugfix
Feature
Code style update
Expand All @@ -34,29 28,27 @@
Build-related changes
Repo settings
Other
-->
<!--
If you chose Other, please describe.
If you choose Other, describe it.
-->

## **For any code change,**
## For any code change,

- [ ] Related documentation has been updated if needed
- [ ] Related tests have been updated or tests have been added
<!-- (Change "[ ]" to "[x]" to check a box.) -->

## **Does this PR introduce a breaking change?** (check one)
- [ ] Related documentation has been updated, if needed
- [ ] Related tests have been added or updated, if needed

- [ ] Yes
- [ ] No
## Does this PR introduce a breaking change?

If yes, please describe the impact and migration path for existing applications:
<!-- (pick one) -->

## **Related issue, if any:**
Yes
No

<!-- Paste issue's link or number hashtag here. -->
<!-- If yes, describe the impact and migration path for existing applications. -->

## **Tested in the following browsers:**
## Tested in the following browsers:

- [ ] Chrome
- [ ] Firefox
Expand Down
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 6,12 @@
version: 2
updates:
- package-ecosystem: npm # See documentation for possible values
directory: "/" # Location of package manifests
directory: '/' # Location of package manifests
open-pull-requests-limit: 10
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
interval: 'weekly'
- package-ecosystem: 'github-actions'
directory: '/'
open-pull-requests-limit: 10
schedule:
interval: monthly
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 7,4 @@ ports:
onOpen: ignore
vscode:
extensions:
- [email protected]:xX39oruAJ5UQzTNVRdbBaQ==
- [email protected]:xX39oruAJ5UQzTNVRdbBaQ==
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 1,6 @@
CHANGELOG.md
HISTORY.md
lib/
themes/
_playwright-*/
emoji-data.*
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 1,4 @@
<!-- Historical history file (do not edit). -->

<a name="3.7.3"></a>
## [3.7.3](https://github.com/QingWei-Li/docsify/compare/v3.7.2...v3.7.3) (2017-05-22)
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 27,7 @@
</a>
</p>

Docsify turns one or more Markdown files into a Website, with no build process required.
Docsify turns one or more Markdown files into a Website, with no build process required.

## Features

Expand Down Expand Up @@ -57,14 57,6 @@ A large collection of showcase projects are included in [awesome-docsify](https:
- [Awesome docsify](https://github.com/docsifyjs/awesome-docsify)
- [Community chat](https://discord.gg/3NwKFyR)

## Similar Projects

| Project | Description |
| ------------------------------------------------ | ---------------------------------------- |
| [Docusaurus](https://docusaurus.io) | Docusaurus makes it easy to maintain Open Source documentation websites |
| [MkDocs](https://www.mkdocs.org) | Project documentation with Markdown |
| [VitePress](https://vitepress.dev/) | Vite & Vue Powered Static Site Generator |

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md).
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 6,7 @@ If you believe you have found a security vulnerability in docsify, please report

**Please do not report security vulnerabilities through our public GitHub issues.**

Send email via :email: [email protected] to us.
Send email to us via :email: [email protected].

Please include as much of the following information as possible to help us better understand the possible issue:

Expand Down
Loading

1 comment on commit 7bbf13d

@vercel
Copy link

@vercel vercel bot commented on 7bbf13d Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.