Commit Graph

77 Commits

Author SHA1 Message Date
John Hildenbiddle
f5412dc7b0
chore: Update lint configuration (ESLint 9, Prettier 3) (#2438)
* Update linting configuration (eslint, prettier)

* Fix lint issues following eslint prettier update

* Change ESLint config to allow boolean coercion

* Switch to default import name per docs

* Fix suppression of error details

* Update JSDoc comments

* Update waiForFunctin to provide error details

---------

Co-authored-by: Koy Zhuang <koy@ko8e24.top>
2024-05-28 15:27:29 -05:00
Koy Zhuang
6552853fef
update(ci): add update emoji schedule workflow (#2436)
---------

Co-authored-by: Luffy <52o@qq52o.cn>
2024-05-25 12:45:11 +08:00
John Hildenbiddle
4ae87bb18b
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
2024-05-21 15:19:21 -05:00
John Hildenbiddle
b9f256d848
Build: Add test run to release script (#2433) 2024-05-20 22:34:52 -05:00
John Hildenbiddle
947d8decb8
fix: dev mode hot reload and add sourcemaps (#2402)
---------

Co-authored-by: Koy Zhuang <koy@ko8e24.top>
Co-authored-by: sy-records <52o@qq52o.cn>
2024-04-17 11:52:48 +08:00
John Hildenbiddle
167596be51
chore: Update local and Vercel preview. Fix CSS watch functionality. (#2348) 2023-12-22 13:27:13 +08:00
Lu Fei
02e525c62e
chore: optimize compressed css script (#2338) 2023-12-22 08:09:13 +08:00
John Hildenbiddle
1c5a7013f1
Chore: Clean up server implementation and update test docs (#2316)
- Replace live-server with existing Browsersync dependency as web server
- Remove duplicate `index.html` file
- Add `build:html` script to generate `/docs/preview.html`
2023-12-11 15:00:33 -06:00
Joe Pea
7bbf13d9bd
Ensure code format (#2138)
* 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](https://github.com/docsifyjs/docsify/issues/2104), as well as works towards [Encapsulating Docsify](https://github.com/docsifyjs/docsify/issues/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 <koy@ko8e24.top>
Co-authored-by: i544693 <369491420@qq.com>
2023-08-09 17:53:30 +08:00
Joe Pea
b621e0e4e7 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.
2023-07-03 01:50:00 -07:00
Joe Pea
9cb76027cd Merge branch 'es-modules' into update-rollup
* es-modules:
  feat: add google analytics gtag.js plugin (#1702)
  chore: bump conventional-changelog-cli from 2.2.2 to 3.0.0 (#2085)
2023-07-02 12:48:13 -07:00
Joe Pea
d34fef3635 Merge branch 'develop' into es-modules 2023-07-02 12:17:19 -07:00
Joe Pea
103dde845f Merge branch 'develop' into delete-ssr
* develop:
  feat: add google analytics gtag.js plugin (#1702)
  chore: bump conventional-changelog-cli from 2.2.2 to 3.0.0 (#2085)
2023-06-29 19:55:12 -07:00
Joe Pea
7a972d402a chore: update rollup
Update rollup and plugins, and remove some plugins. We'll use Rollup for
now only to bundle and minify our code, but otherwise we'll write
reasonably modern code and not need a transform.
2023-06-29 19:20:15 -07:00
Joe Pea
62d756c447 refactor: convert to ES Modules and remove traces of CommonJS except in Rollup config because some dependencies are still CommonJS
BREAKING: The new project layout might break in some tooling setups.

We've added an exports field to `package.json` to specify where
statements like `import ... from 'docsify'` will import from, and left
the `main` and `unpkg` fields as-is for backwards compatibility with the
global <script> import method. Most people who use a non-module
`<script>` tag to import Docsify will not notice a difference. Anyone
else who is importing Docsify into a specilized build setup using
`import` statements has a chance of being broken, so we've marked this
as BREAKING.
2023-06-29 19:02:08 -07:00
Eko Zhan
29f3c82faa
feat: add google analytics gtag.js plugin (#1702)
Co-authored-by: Joe Pea <joe@trusktr.io>
Co-authored-by: 沈唁 <52o@qq52o.cn>
Co-authored-by: John Hildenbiddle <jhildenbiddle@users.noreply.github.com>
Co-authored-by: zhanzhao <zhanzhao@megvii.com>
2023-06-27 10:54:16 +08:00
Joe Pea
8d5d20480a refactor: delete the experimental and incomplete SSR feature
BREAKING: SSR removed

Anyone depending on SSR will need to stay on an old Docsify version for
now, move forward without SSR, or maintain SSR against a fork of updated
Docsify. We have ideas on a better way to implement SSR, but these ideas
have not been implemented yet.
2023-06-25 12:03:44 -07:00
John Hildenbiddle
ba5ee26f00
feat: Emoji build (#1766)
* Fix incorrect file name

* Improve build

- Display emoji API URL
- Display number of emoji entries retrieved from API
- Distinguish between creating and updating files
- Catch and display errors (gracefully fail for offline work)
- Add “DO NOT EDIT” comment to generated output

* Add emoji to automated build

* Remove emoji plugin from dev index.html
2022-03-08 16:22:10 +08:00
John Hildenbiddle
35002c92b7
feat: Native emoji w/ image-based fallbacks and improved parsing (#1746)
* Render native emoji with image fallback

Fix #779

* Deprecate emoji plugin

* Add emoji tests

* Remove console.log statement

* Fix emoji image alt attribute

* Set nativeEmoji to false by default (non-breaking)

* Fix parsing emoji in HTML comments and script tags

* Add nativeEmoji and update noEmoji details

* Add Emoji plugin deprecation notice

* Fix ESLint issues

* Create build:emoji task

- Auto-generate emoji data from GitHub API
- Auto-generate emoji markdown for website
- Add emoji page to navigation

* Fix rendering of GitHub emoji without unicode

* Adjust and match size of native and image emoji

* Update emoji test snapshot

* Update docs test snapshot

* Fix ci/codesandbox error

* Update native emoji font-stack

* Fix rendering of native multi-character emoji

* Kick GitHub Workflow

* Replace rollup’s uglify plugin with terser

* Switch “npm ci” instead of “npm i” for stability

* Change emoji data from default to named export

* Revert "Replace rollup’s uglify plugin with terser"

This reverts commit 7ba85136361c72839516900d91cca806fac94fee.

* Revert "Switch “npm ci” instead of “npm i” for stability"

This reverts commit d52b476a387250740d934e8fd7df7ba274dd17a0.

* Revert "Change emoji data from default to named export"

This reverts commit 3f2dd467cf9c7a74d8c53c2ee52cc63837b00a3c.

* Specify codesandbox template and node version

* Update codesandbox config

* Revert "Revert "Replace rollup’s uglify plugin with terser""

This reverts commit e06fed49f0383c485e01f1758228849ad0085bc8.

* Revert "Revert "Revert "Replace rollup’s uglify plugin with terser"""

This reverts commit 27d49521f61976dedcbbf210e1811839853e0e47.

* Update codesandbox config

* Revert "Update codesandbox config"

This reverts commit 5120dd23d45fbd4b2c893db33acbf7014e57c023.

* Fix codesandbox uglify error

* Emoji docs tweaks

* Restore and update emoji plugin code

* Restore and update emoji plugin docs

* Prettier updates

* Match lowercase shortcodes only

Co-authored-by: Koy Zhuang <369491420@qq.com>
2022-03-05 22:25:09 -06:00
Snyk bot
086c2859ad
[Snyk] Security upgrade marked from 0.7.0 to 1.1.1 (#1313)
* fix: package.json & package-lock.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-MARKED-584281

* fix: fix CompileError

* fix: embed files error

Co-authored-by: Koy <369491420@qq.com>
Co-authored-by: 沈唁 <52o@qq52o.cn>
2020-08-14 07:53:23 +08:00
Mohammed Sahl
3673001a24
fix: Add error handling for missing dependencies (fixes #1210) (#1232)
* Add error handling for missing dependencies

* Informative error message

* Add error handling for missing dependencies

* Informative error message

* Add dependecy import location, error message changes
2020-06-23 22:03:22 +05:30
Joe Pea
146e4c4e18
Update build/css.js
Co-authored-by: James George <jamesgeorge998001@gmail.com>
2020-06-12 22:16:24 -07:00
Joe Pea
88033b639e remove the DOCSIFY global made by Rollup, and move Docsify into a separate file where we can import it from tests while leaving the entry point for the bundle without any exports so that Rollup will not create a global variable from it 2020-06-07 11:09:06 -07:00
Joe Pea
7e002bf939 feat: update src/core/index.js to export all global APIs, deprecate old globals in favor of a single global DOCSIFY, and add tests for this 2020-05-23 14:10:00 -07:00
Joe Pea
b72cb3d94c add build error handling so builds don't silently fail 2020-05-22 23:59:25 -07:00
anikethsaha
b62b213435 [build] 4.10.0 2019-12-16 22:58:51 +05:30
anikethsaha
4a8f2c5bfa chore: fixed the npm script and added css build file 2019-12-16 22:32:32 +05:30
Andrey Chalkin
615205cfdb fix: npm audit issues (#934) 2019-10-16 09:20:54 -04:00
Anton Wilhelm
5bd24fb83c Do not commit any files in lib during release 2019-05-05 18:35:34 +02:00
Anton Wilhelm
3f50381090 Add matomo plugin to build script 2019-05-05 18:12:13 +02:00
Anton Wilhelm
b38c2065e0 add execute access to release.sh 2019-04-21 12:01:04 +02:00
qingwei.li
2bc880d335 fix: ssr package dep, fixed #605 2018-10-31 21:11:06 +08:00
John Hildenbiddle
94bc415534 feat: Add docsify version to $window.docsify object (#641)
Fix #521

Please makes sure these boxes are checked before submitting your PR, thank you!

* [ x ] Make sure you are merging your commits to `master` branch.
* [ x ] Add some descriptions and refer relative issues for you PR.
* [ x ] DO NOT include files inside `lib` directory.
2018-10-23 15:26:55 +08:00
qingwei.li
95e95bd23b chore: remove fuck cssnano-cli 2018-03-03 23:20:07 +08:00
cinwell.li
8352a1e489
refactor: build config (#408)
* refactor: build config

* chore: fix conflict

* fix: 404 page path
2018-03-03 22:51:27 +08:00
qingwei.li
342438f2a7 fix: build config 2018-02-11 22:22:06 +08:00
cinwell.li
820abeb0fd chore: upgrade deps (#338) 2018-02-11 22:22:06 +08:00
qingwei.li
66c8fd501a fix: remove codesponsor 2017-12-13 10:29:53 +08:00
spiritree
9208e64939 feat: add gitalk plugin (#306) 2017-11-09 20:53:07 +08:00
qingwei.li
fd7d4e0e4e feat: add disqus plugin, closed #123 2017-11-04 13:54:37 +08:00
Alexander Chibrikin
470ee474d4 chore: ignore ./lib , force add ./lib on release (#283) 2017-10-15 19:20:35 -05:00
qingwei.li
aba2aec0d0 chore: prettier code 2017-09-22 10:07:10 +08:00
qingwei.li
ae3f74bfd4 chore: add build script 2017-09-20 09:01:31 +08:00
qingwei.li
628e2115a3 fix(release): release shell 2017-07-27 10:02:49 +08:00
qingwei.li
271dde8f5e chore(*): fix changelog script 2017-07-27 09:58:37 +08:00
qingwei.li
3de3def8a8 chore(*): fix changelog script 2017-07-26 18:55:13 +08:00
qingwei.li
761e38f6ad chore: add changelog 4.2.2 2017-07-24 19:06:24 +08:00
qingwei.li
306136f6a3 chore: update changlog 2017-07-20 01:13:47 +08:00
qingwei.li
437737cc5a chore: update release shell 2017-07-20 00:53:25 +08:00
Kim Burgess
e54062f80d Remove unnecessary moduleName option from rollup config for plugins (#209) 2017-07-18 17:44:25 +08:00