docsify/package.json
John Hildenbiddle bb902f8997
refactor: event modernization and optimization (#2404)
- Refactor methods names and functionality
- Replace scroll listeners with observers
- Replace Tweezer-based scrolling with native scroll methods
- Remove tweezer.js dependency
- Remove redundant method calls
- Rename $resetEvents to onNavigate
- Rename __scrollActiveSidebar to onRender
- Remove __getAndActive
- Remove __sticky
- Add IntersectionObserver mock to Jest environment

Also included:

- Add e2e test “ui” and “chromium” scripts
- Rename "jest" script to "test:jest"
- Remove unused SSR code

---------

Co-authored-by: Koy Zhuang <koy@ko8e24.top>
2024-04-21 07:44:14 -05:00

123 lines
4.5 KiB
JSON

{
"name": "docsify",
"version": "4.13.0",
"description": "A magical documentation generator.",
"homepage": "https://docsify.js.org",
"repository": "github:docsifyjs/docsify",
"authors": "https://github.com/docsifyjs/docsify/graphs/contributors",
"license": "MIT",
"collective": {
"url": "https://opencollective.com/docsify"
},
"type": "module",
"// The 'main' and 'unpkg' fields will remain as legacy for backwards compatibility for now. We will add deprectaion warnings to these outputs to give people time to see the warnings in their apps in a non-breaking way, and eventually we can remove the legacy stuff.": "",
"main": "lib/docsify.js",
"unpkg": "lib/docsify.min.js",
"// We're using the 'exports' field as an override of the 'main' field to provide the new ESM setup. Once we remove legacy 'main', we will remove the 'exports' field and have a simple ESM setup with only a 'main' field.": "",
"exports": {
".": "./src/Docsify.js",
"./*": "./*"
},
"files": [
"lib",
"themes"
],
"scripts": {
"build:cover": "node build/cover.js",
"build:css:min": "node build/mincss.js",
"build:css": "mkdirp lib/themes && node build/css -o lib/themes",
"build:emoji": "node ./build/emoji.js",
"build:js": "cross-env NODE_ENV=production node build/build.js",
"build": "run-s clean build:js build:css build:css:min build:cover build:emoji",
"clean": "rimraf lib themes _playwright*",
"dev": "run-p serve:dev watch:*",
"docker:build:test": "npm run docker:cli -- build:test",
"docker:build": "docker build -f Dockerfile -t docsify-test:local .",
"docker:clean": "docker rmi docsify-test:local",
"docker:cli": "docker run --rm -it --ipc=host --mount type=bind,source=$(pwd)/test,target=/app/test docsify-test:local",
"docker:rebuild": "run-s docker:clean docker:build",
"docker:test:e2e": "npm run docker:cli -- test:e2e",
"docker:test:integration": "npm run docker:cli -- test:integration",
"docker:test:unit": "npm run docker:cli -- test:unit",
"docker:test": "npm run docker:cli -- test",
"lint:fix": "eslint . --fix",
"lint": "prettier . --check && eslint .",
"postinstall": "opencollective-postinstall && npx husky install",
"prepare": "npm run build",
"prettier": "prettier . --write",
"pub:next": "cross-env RELEASE_TAG=next sh build/release.sh",
"pub": "sh build/release.sh",
"serve:dev": "npm run serve -- --dev",
"serve": "node server",
"test:e2e": "playwright test",
"test:e2e:chromium": "playwright test --project='chromium'",
"test:e2e:ui": "playwright test --ui",
"test:integration": "npm run test:jest -- --selectProjects integration",
"test:jest": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
"test:unit": "npm run test:jest -- --selectProjects unit",
"test": "run-s test:jest test:e2e",
"watch:css": "npm run build:css -- -w",
"watch:js": "node build/build.js"
},
"lint-staged": {
"*.js": "eslint --fix"
},
"dependencies": {
"marked": "^4.2.12",
"medium-zoom": "^1.1.0",
"opencollective-postinstall": "^2.0.2",
"prismjs": "^1.29.0",
"strip-indent": "^3.0.0",
"tinydate": "^1.3.0"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/eslint-parser": "^7.16.5",
"@babel/preset-env": "^7.11.5",
"@eslint/js": "^8.43.0",
"@playwright/test": "^1.39.0",
"@rollup/plugin-commonjs": "^25.0.2",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-terser": "^0.4.3",
"@types/eslint": "^8.40.2",
"autoprefixer-stylus": "^1.0.0",
"axios": "^1.5.0",
"babel-jest": "^27.4.6",
"browser-sync": "^2.26.12",
"chokidar": "^3.4.2",
"common-tags": "^1.8.0",
"conventional-changelog-cli": "^3.0.0",
"copy-dir": "^1.2.0",
"cross-env": "^7.0.3",
"cssnano": "^4.1.10",
"eslint": "^8.43.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.2",
"eslint-plugin-playwright": "^0.16.0",
"eslint-plugin-prettier": "^4.2.1",
"globals": "^13.20.0",
"husky": "^9.0.11",
"jest": "^27.4.7",
"lint-staged": "^13.2.2",
"mkdirp": "^3.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"rimraf": "^3.0.0",
"rollup": "^3.25.3",
"serve-handler": "^6.1.2",
"stylus": "^0.60.0",
"vue2": "npm:vue@^2.6.12",
"vue3": "npm:vue@^3.0.0",
"xhr-mock": "^2.5.1"
},
"keywords": [
"doc",
"docs",
"documentation",
"creator",
"generator"
]
}