package.json 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. {
  2. "name": "css-tree",
  3. "version": "3.1.0",
  4. "description": "A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations",
  5. "author": "Roman Dvornov <rdvornov@gmail.com> (https://github.com/lahmatiy)",
  6. "license": "MIT",
  7. "repository": "csstree/csstree",
  8. "keywords": [
  9. "css",
  10. "ast",
  11. "tokenizer",
  12. "parser",
  13. "walker",
  14. "lexer",
  15. "generator",
  16. "utils",
  17. "syntax",
  18. "validation"
  19. ],
  20. "type": "module",
  21. "module": "./lib/index.js",
  22. "main": "./cjs/index.cjs",
  23. "exports": {
  24. ".": {
  25. "import": "./lib/index.js",
  26. "require": "./cjs/index.cjs"
  27. },
  28. "./dist/*": "./dist/*.js",
  29. "./package.json": "./package.json",
  30. "./tokenizer": {
  31. "import": "./lib/tokenizer/index.js",
  32. "require": "./cjs/tokenizer/index.cjs"
  33. },
  34. "./parser": {
  35. "import": "./lib/parser/index.js",
  36. "require": "./cjs/parser/index.cjs"
  37. },
  38. "./selector-parser": {
  39. "import": "./lib/parser/parse-selector.js",
  40. "require": "./cjs/parser/parse-selector.cjs"
  41. },
  42. "./generator": {
  43. "import": "./lib/generator/index.js",
  44. "require": "./cjs/generator/index.cjs"
  45. },
  46. "./walker": {
  47. "import": "./lib/walker/index.js",
  48. "require": "./cjs/walker/index.cjs"
  49. },
  50. "./convertor": {
  51. "import": "./lib/convertor/index.js",
  52. "require": "./cjs/convertor/index.cjs"
  53. },
  54. "./lexer": {
  55. "import": "./lib/lexer/index.js",
  56. "require": "./cjs/lexer/index.cjs"
  57. },
  58. "./definition-syntax": {
  59. "import": "./lib/definition-syntax/index.js",
  60. "require": "./cjs/definition-syntax/index.cjs"
  61. },
  62. "./definition-syntax-data": {
  63. "import": "./lib/data.js",
  64. "require": "./cjs/data.cjs"
  65. },
  66. "./definition-syntax-data-patch": {
  67. "import": "./lib/data-patch.js",
  68. "require": "./cjs/data-patch.cjs"
  69. },
  70. "./utils": {
  71. "import": "./lib/utils/index.js",
  72. "require": "./cjs/utils/index.cjs"
  73. }
  74. },
  75. "browser": {
  76. "./cjs/data.cjs": "./dist/data.cjs",
  77. "./cjs/version.cjs": "./dist/version.cjs",
  78. "./lib/data.js": "./dist/data.js",
  79. "./lib/version.js": "./dist/version.js"
  80. },
  81. "unpkg": "dist/csstree.esm.js",
  82. "jsdelivr": "dist/csstree.esm.js",
  83. "scripts": {
  84. "watch": "npm run build -- --watch",
  85. "build": "npm run bundle && npm run esm-to-cjs --",
  86. "build-and-test": "npm run build && npm run test:dist && npm run test:cjs",
  87. "bundle": "node scripts/bundle",
  88. "bundle-and-test": "npm run bundle && npm run test:dist",
  89. "esm-to-cjs": "node scripts/esm-to-cjs.cjs",
  90. "esm-to-cjs-and-test": "npm run esm-to-cjs && npm run test:cjs",
  91. "lint": "eslint lib scripts && node scripts/review-syntax-patch --lint && node scripts/update-docs --lint",
  92. "lint-and-test": "npm run lint && npm test",
  93. "update:docs": "node scripts/update-docs",
  94. "review:syntax-patch": "node scripts/review-syntax-patch",
  95. "test": "mocha lib/__tests --require lib/__tests/helpers/setup.js --reporter progress",
  96. "test:cjs": "mocha cjs/__tests --require lib/__tests/helpers/setup.js --reporter progress",
  97. "test:dist": "mocha dist/__tests --reporter progress",
  98. "coverage": "c8 --exclude lib/__tests --reporter=lcovonly npm test",
  99. "prepublishOnly": "npm run lint-and-test && npm run build-and-test"
  100. },
  101. "dependencies": {
  102. "mdn-data": "2.12.2",
  103. "source-map-js": "^1.0.1"
  104. },
  105. "devDependencies": {
  106. "c8": "^7.12.0",
  107. "clap": "^2.0.1",
  108. "esbuild": "^0.24.0",
  109. "eslint": "^8.4.1",
  110. "json-to-ast": "^2.1.0",
  111. "mocha": "^9.2.2",
  112. "rollup": "^2.79.2"
  113. },
  114. "engines": {
  115. "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
  116. },
  117. "files": [
  118. "data",
  119. "dist",
  120. "cjs",
  121. "!cjs/__tests",
  122. "lib",
  123. "!lib/__tests"
  124. ]
  125. }