Skip to content

Commit 4ae87bb

Browse files
build: v5 updates and refactors (#2428)
* Update JS build - Change rollup build from API to config file - Change output dir from lib to dist - Update lib to dist path in related files - Update dependencies - Add banner comment to bundles - Add unminified plugin bundles * Update docs with v5 version lock and dist path * Update docs to reference minified themes * Clean up docs * Update CSS build - Change CSS build from API to CLI - Change output dir from lib to dist - Update lib to dist path in related files - Update dependencies - Add sourcemaps * Update dependencies * Clean up package.json and add keywords * Fix rimraf globs on Windows * Fix PostCSS CLI glob on Windows * Update test-related dependencies * Update emoji * Add engines prop to package.json
1 parent b9f256d commit 4ae87bb

35 files changed

+4513
-4206
lines changed

.eslintignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
# Directories
12
.git
2-
**/*.md
33
build
4+
dist
45
docs
56
lib
67
node_modules
8+
9+
# Files
10+
**/*.md
711
server.js
8-
themes

.gitignore

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
.DS_Store
1+
# Directories
2+
.husky/_
23
.idea
4+
.vercel
5+
_playwright-report
6+
_playwright-results
7+
dist
8+
lib
9+
node_modules
10+
11+
# Files
12+
.DS_Store
313
*.log
4-
/_playwright-report
5-
/_playwright-results
6-
/lib
7-
/node_modules
8-
/.husky/_
914

10-
# exceptions
15+
# Exceptions
1116
!.gitkeep
12-
.vercel
13-

.prettierignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
# Directories
2+
_playwright-*
3+
dist
4+
lib
5+
6+
# Files
17
CHANGELOG.md
2-
HISTORY.md
3-
lib/
4-
themes/
5-
_playwright-*/
68
emoji-data.*
9+
HISTORY.md

babel.config.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
[
44
"@babel/preset-env",
55
{
6-
"targets": {
7-
"node": "current"
8-
}
6+
"targets": "defaults"
97
}
108
]
119
]

build/build.js

Lines changed: 0 additions & 159 deletions
This file was deleted.

build/css.js

Lines changed: 0 additions & 48 deletions
This file was deleted.

build/mincss.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/cdn.md

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,56 @@
11
# CDN
22

3-
Recommended: [jsDelivr](//cdn.jsdelivr.net), which will reflect the latest version as soon as it is published to npm. You can also browse the source of the npm package at [cdn.jsdelivr.net/npm/docsify/](//cdn.jsdelivr.net/npm/docsify/).
3+
The docsify [npm package](https://www.npmjs.com/package/docsify) is auto-published to CDNs with each release. The contents can be viewed on each CDN.
44

5-
## Latest version
5+
Docsify recommends [jsDelivr](//cdn.jsdelivr.net) as its preferred CDN:
66

7-
```html
8-
<!-- load css -->
9-
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css" />
7+
- https://cdn.jsdelivr.net/npm/docsify/
108

11-
<!-- load script -->
12-
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.js"></script>
13-
```
9+
Other CDNs are available and may be required in locations where jsDelivr is not available:
1410

15-
Alternatively, use [compressed files](#compressed-file).
11+
- https://cdnjs.com/libraries/docsify
12+
- https://unpkg.com/browse/docsify/
13+
- https://www.bootcdn.cn/docsify/
1614

17-
## Specific version
15+
## Specifying versions
1816

19-
```html
20-
<!-- load css -->
21-
<link
22-
rel="stylesheet"
23-
href="//cdn.jsdelivr.net/npm/docsify@4.10.2/themes/vue.css"
24-
/>
25-
26-
<!-- load script -->
27-
<script src="//cdn.jsdelivr.net/npm/docsify@4.10.2/lib/docsify.js"></script>
28-
```
17+
Note the `@` version lock in the CDN URLs below. This allows specifying the latest major, minor, patch, or specific [semver](https://semver.org) version number.
2918

30-
## Compressed file
19+
- MAJOR versions include breaking changes<br>
20+
`1.0.0``2.0.0`
21+
- MINOR versions include non-breaking new functionality<br>
22+
`1.0.0``1.1.0`
23+
- PATCH versions include non-breaking bug fixes<br>
24+
`1.0.0``1.0.1`
3125

32-
```html
33-
<!-- load css -->
34-
<link
35-
rel="stylesheet"
36-
href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css"
37-
/>
38-
39-
<!-- load script -->
40-
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
41-
```
26+
Uncompressed resources are available by omitting the `.min` from the filename.
27+
28+
## Latest "major" version
29+
30+
Specifying the latest major version allows your site to receive all non-breaking enhancements ("minor" updates) and bug fixes ("patch" updates) as they are released. This is good option for those who prefer a zero-maintenance way of keeping their site up to date with minimal risk as new versions are published.
4231

32+
?> When a new major version is released, you will need to manually update the major version number after the `@` symbol in your CDN URLs.
33+
34+
<!-- prettier-ignore -->
4335
```html
44-
<!-- load css -->
45-
<link
46-
rel="stylesheet"
47-
href="//cdn.jsdelivr.net/npm/docsify@4.10.2/lib/themes/vue.css"
48-
/>
49-
50-
<!-- load script -->
51-
<script src="//cdn.jsdelivr.net/npm/docsify@4.10.2/lib/docsify.min.js"></script>
36+
<!-- Theme -->
37+
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@5/themes/vue.min.css" />
38+
39+
<!-- Docsify -->
40+
<script src="//cdn.jsdelivr.net/npm/docsify@5/dist/docsify.min.js"></script>
5241
```
5342

54-
## Other CDN
43+
## Specific version
5544

56-
- https://www.bootcdn.cn/docsify/
57-
- https://cdn.jsdelivr.net/npm/docsify/
58-
- https://cdnjs.com/libraries/docsify
59-
- https://unpkg.com/browse/docsify/
45+
Specifying an exact version prevents any future updates from affecting your site. This is good option for those who prefer to manually update their resources as new versions are published.
46+
47+
?> When a new version is released, you will need to manually update the version number after the `@` symbol in your CDN URLs.
48+
49+
<!-- prettier-ignore -->
50+
```html
51+
<!-- Theme -->
52+
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@5.0.0/themes/vue.min.css" />
53+
54+
<!-- Docsify -->
55+
<script src="//cdn.jsdelivr.net/npm/docsify@5.0.0/dist/docsify.min.js"></script>
56+
```

0 commit comments

Comments
 (0)