react-syntax-highlighter
Version:
syntax highlighting component for react with prismjs or highlightjs ast using inline styles
131 lines (130 loc) • 4.54 kB
JSON
{
"name": "react-syntax-highlighter",
"version": "16.1.1",
"description": "syntax highlighting component for react with prismjs or highlightjs ast using inline styles",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.28.4",
"highlight.js": "^10.4.1",
"highlightjs-vue": "^1.0.0",
"lowlight": "^1.17.0",
"prismjs": "^1.30.0",
"refractor": "^5.0.0"
},
"jest": {
"coverageDirectory": "./coverage/",
"collectCoverage": true,
"moduleNameMapper": {
"^refractor/core$": "<rootDir>/node_modules/refractor/lib/core.js",
"^refractor/all$": "<rootDir>/node_modules/refractor/lib/all.js",
"^refractor/(.+)$": "<rootDir>/node_modules/refractor/lang/$1.js"
},
"transformIgnorePatterns": [
"node_modules/(?!refractor)/",
"node_modules/(?!hastscript)/",
"node_modules/(?!parse-entities)/",
"node_modules/(?!property-information)/",
"node_modules/(?!hast-util-parse-selector)/",
"node_modules/(?!comma-separated-tokens)/",
"node_modules/(?!space-separated-tokens)/",
"node_modules/(?!character-entities-legacy)/",
"node_modules/(?!character-reference-invalid)/",
"node_modules/(?!is-decimal)/",
"node_modules/(?!is-whitespace-like)/",
"node_modules/(?!is-blank)/"
]
},
"devDependencies": {
"@babel/cli": "^7.28.3",
"@babel/core": "^7.28.4",
"@babel/eslint-parser": "^7.28.4",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-class-properties": "^7.27.1",
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
"@babel/plugin-transform-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.28.3",
"@babel/preset-env": "^7.28.3",
"@babel/preset-react": "^7.27.1",
"babel-jest": "^26.1.0",
"babel-loader": "^9.2.1",
"babel-plugin-add-import-extension": "^1.6.0",
"babel-plugin-transform-dynamic-import": "^2.1.0",
"chokidar": "^3.6.0",
"cross-env": "^7.0.3",
"css": "^2.2.1",
"css-loader": "^6.11.0",
"eslint": "^7.7.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-jest": "^23.20.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.6",
"husky": "^1.1.4",
"jest": "^26.1.0",
"lint-staged": "^14.0.1",
"prettier": "^1.15.2",
"prism-themes": "1.9.0",
"react": "^15.2.0",
"react-dom": "^15.2.0",
"react-syntax-highlighter-virtualized-renderer": "^1.0.3",
"react-test-renderer": "^15.3.2",
"request": "^2.88.0",
"style-loader": "^3.3.4",
"to-camel-case": "^1.0.0",
"webpack": "^5.102.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.2"
},
"peerDependencies": {
"react": ">= 0.14.0"
},
"engines": {
"node": ">= 16.20.2"
},
"scripts": {
"dev": "webpack-dev-server --hot",
"build": "npm run build:cjs && npm run build:esm && webpack",
"build:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir ./dist/cjs",
"build:esm": "cross-env BABEL_ENV=esm babel src --out-dir ./dist/esm",
"watch": "npm run build:esm -- --watch",
"build-styles-hljs": "node ./scripts/build-stylesheets-highlightjs.js",
"build-languages-hljs": "node ./scripts/build-languages-highlightjs.js",
"build-styles-prism": "node ./scripts/build-stylesheets-refractor.js",
"build-languages-prism": "node ./scripts/build-languages-refractor.js",
"prepare": "npm run build-styles-hljs && npm run build-languages-hljs && npm run build-styles-prism && npm run build-languages-prism && npm run build",
"test": "jest",
"test-ci": "jest",
"format": "npm run prettier",
"prettier": "prettier --write --no-editorconfig \"{src,scripts,__tests__}/**/*.js\"",
"lint": "eslint --ext .js,.jsx ./src ./scripts ./__tests__"
},
"repository": {
"type": "git",
"url": "git+https://github.com/react-syntax-highlighter/react-syntax-highlighter.git"
},
"keywords": [
"react",
"syntax",
"lowlight",
"highlighting",
"ast"
],
"author": "Conor Hastings",
"license": "MIT",
"bugs": {
"url": "https://github.com/react-syntax-highlighter/react-syntax-highlighter/issues"
},
"homepage": "https://github.com/react-syntax-highlighter/react-syntax-highlighter#readme",
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,json,css,md}": [
"prettier --write",
"git add"
]
}
}