feat: add python syntax highlighting (#39079)

To err on the side of caution, this explicitly includes all languages
that were implicitly included before using the Babel plugin.
pull/39090/head
Oliver Eyton-Williams 2020-06-17 17:03:08 +02:00 committed by GitHub
parent 6e5988da4e
commit 9954c3d0bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 7 deletions

View File

@ -37,16 +37,34 @@
"regenerator": true
}
],
["babel-plugin-transform-imports", {
[
"babel-plugin-transform-imports",
{
"react-bootstrap": {
"transform": "react-bootstrap/lib/${member}",
"preventFullImport": true
"transform": "react-bootstrap/lib/${member}",
"preventFullImport": true
},
"lodash": {
"transform": "lodash/${member}",
"preventFullImport": true
"transform": "lodash/${member}",
"preventFullImport": true
}
}
}
],
[
"prismjs",
{
"languages": [
"clike",
"css",
"html",
"javascript",
"markup",
"mathml",
"python",
"svg",
"xml"
], "theme": "default", "css": true
}
]
]
}

View File

@ -3521,6 +3521,11 @@
"resolve": "^1.12.0"
}
},
"babel-plugin-prismjs": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/babel-plugin-prismjs/-/babel-plugin-prismjs-2.0.1.tgz",
"integrity": "sha512-GqQGa3xX3Z2ft97oDbGvEFoxD8nKqb3ZVszrOc5H7icnEUA56BIjVYm86hfZZA82uuHLwTIfCXbEKzKG1BzKzg=="
},
"babel-plugin-remove-graphql-queries": {
"version": "2.9.1",
"resolved": "https://registry.npmjs.org/babel-plugin-remove-graphql-queries/-/babel-plugin-remove-graphql-queries-2.9.1.tgz",

View File

@ -20,6 +20,7 @@
"@reach/router": "^1.2.1",
"algoliasearch": "^3.35.1",
"axios": "^0.19.0",
"babel-plugin-prismjs": "^2.0.1",
"bezier-easing": "^2.1.0",
"browser-cookies": "^1.2.0",
"chai": "^4.2.0",

View File

@ -13,7 +13,6 @@ import {
import createRedirect from '../../components/createRedirect';
import DonateModal from '../Donation/DonationModal';
import 'prismjs/themes/prism.css';
import './prism.css';
import './prism-night.css';
import 'react-reflex/styles.css';