package.json 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. {
  2. "name": "tocbot",
  3. "version": "4.25.0",
  4. "description": "Generate a table of contents based on the heading structure of a html document.",
  5. "main": "src/js/index.js",
  6. "scripts": {
  7. "clean": "rm -rf dist/",
  8. "mkdir-dist": "mkdir dist",
  9. "cleanInstall": "rm -rf node_modules package-lock.json && npm i",
  10. "build": "npm run build-all",
  11. "build-all": "npm run clean && npm run mkdir-dist && npm run build-js && npm run build-js-uglify && npm run build-css && npm run build-dist && npm run build-docs",
  12. "build-docs": "npm run build-content && npm run next-build && npm run next-export && npm run fix-jekyll",
  13. "build-css": "sass --load-path=./node_modules --style=compressed src/scss/:static/css/",
  14. "build-css-watch": "sass --watch --load-path=./node_modules --style=compressed src/scss/:static/css/",
  15. "build-dist": "cp static/js/tocbot.js ./dist/ && cp static/js/tocbot.min.js ./dist/ && cp static/css/tocbot.css ./dist/ && cp static/css/styles.css ./dist/",
  16. "build-js": "webpack-cli ./src/js/index.js -o static/js/ --mode=development --devtool=source-map && mv static/js/main.js static/js/tocbot.js",
  17. "build-js-watch": "webpack-cli --watch --mode=development ./src/js/index.js -o static/js/",
  18. "build-js-uglify": "webpack-cli ./src/js/index.js -o static/js/ --mode=production && mv static/js/main.js static/js/tocbot.min.js",
  19. "build-content": "processmd \"*.md\" --outputDir data --markdownOptions.html=true --headingIds",
  20. "estimate-js-size": "gzip -9 -c dist/tocbot.min.js | wc -c",
  21. "estimate-css-size": "gzip -9 -c dist/tocbot.css | wc -c",
  22. "fix-jekyll": "cd out && touch .nojekyll",
  23. "lint": "standard --fix",
  24. "dev": "npm run build-css && npm-run-all --parallel \"next\" \"build-js-watch\" \"build-css-watch\" \"build-content\"",
  25. "start": "npm run dev",
  26. "deploy": "npm run build-all && gh-pages -d out",
  27. "deploy:local": "mv out tocbot && mkdir out && mv tocbot out/tocbot",
  28. "test": "npm run lint && mocha test/index.js",
  29. "test:debug": "node-debug _mocha --timeout 0 test/index.js",
  30. "test:watch": "mocha --watch test/index.js",
  31. "test:integration": "codeceptjs run --steps",
  32. "test:update-screenshots": "cp -R -v ./test/__screenshots-new__/* ./test/__screenshots__",
  33. "test:image-diff": "node ./test/imageDiff.js './test/__screenshots__/*.png' './test/__screenshots-new__/*.png'",
  34. "test:diff-preview": "node ./test/diffPreview.js './test/__screenshots__' './test/__screenshots-new__'",
  35. "next": "node ./server.js",
  36. "next-build": "./node_modules/.bin/next build",
  37. "next-export": "./node_modules/.bin/next export",
  38. "next-start": "./node_modules/.bin/next start",
  39. "v-prerelease": "npm version prerelease && git push --tags && npm publish && git push",
  40. "v-patch": "npm version patch && git push --tags && npm publish && git push",
  41. "v-minor": "npm version minor && git push --tags && npm publish && git push",
  42. "v-major": "npm version major && git push --tags && npm publish && git push"
  43. },
  44. "repository": {
  45. "type": "git",
  46. "url": "git+https://github.com/tscanlin/tocbot.git"
  47. },
  48. "keywords": [
  49. "tocbot",
  50. "javascript",
  51. "table",
  52. "of",
  53. "contents",
  54. "generate",
  55. "html",
  56. "structure",
  57. "vanilla"
  58. ],
  59. "author": "Tim Scanlin",
  60. "license": "MIT",
  61. "bugs": {
  62. "url": "https://github.com/tscanlin/tocbot/issues"
  63. },
  64. "homepage": "https://github.com/tscanlin/tocbot",
  65. "devDependencies": {
  66. "@babel/cli": "^7.19.3",
  67. "@babel/core": "^7.20.2",
  68. "@babel/plugin-syntax-dynamic-import": "^7.8.3",
  69. "@babel/preset-env": "^7.20.2",
  70. "@babel/preset-react": "^7.18.6",
  71. "babel-loader": "^9.1.0",
  72. "chai": "^4.3.7",
  73. "eslint": "^8.27.0",
  74. "express": "^4.18.2",
  75. "fs-extra": "^10.1.0",
  76. "gh-pages": "^4.0.0",
  77. "globby": "^13.1.2",
  78. "js-yaml": "^4.1.0",
  79. "jsdom": "^20.0.2",
  80. "marked": "^4.2.2",
  81. "mkdirp": "^1.0.4",
  82. "mocha": "^10.1.0",
  83. "next": "^13.0.3",
  84. "node-resemble-js": "^0.2.0",
  85. "npm-run-all": "^4.1.5",
  86. "processmd": "^4.6.3",
  87. "react": "^18.2.0",
  88. "react-dom": "^18.2.0",
  89. "sass": "^1.56.1",
  90. "standard": "^17.0.0",
  91. "webpack": "^5.75.0",
  92. "webpack-cli": "^4.10.0"
  93. },
  94. "npmName": "tocbot",
  95. "npmFileMap": [
  96. {
  97. "basePath": "dist",
  98. "files": [
  99. "**/*"
  100. ]
  101. }
  102. ],
  103. "standard": {
  104. "ignore": [
  105. "dist/",
  106. "scripts/",
  107. "test/"
  108. ],
  109. "globals": [
  110. "it",
  111. "describe",
  112. "before",
  113. "after",
  114. "beforeEach",
  115. "afterEach"
  116. ]
  117. }
  118. }