mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-22 15:02:51 +02:00
Add syntax highlighting example to menu
This commit is contained in:
16
.lintstagedrc.js
Normal file
16
.lintstagedrc.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const escape = require('shell-quote').quote
|
||||
|
||||
/**
|
||||
* Need this to fix a bug where we can't commit `pages/examples/[example].tsx`
|
||||
*
|
||||
* <https://github.com/okonet/lint-staged/issues/676#issuecomment-574764713>
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
'*.{ts,tsx,js,json,css}': filenames => [
|
||||
...filenames.map(filename => `prettier --check "${escape([filename])}"`),
|
||||
...filenames.map(filename => `git add "${filename}"`),
|
||||
],
|
||||
'*.{ts,tsx,js}': ['eslint'],
|
||||
'*.{ts,tsx,css}': ['stylelint'],
|
||||
}
|
@@ -98,6 +98,7 @@
|
||||
"rollup-plugin-replace": "^2.2.0",
|
||||
"rollup-plugin-terser": "^7.0.0",
|
||||
"rollup-plugin-typescript2": "^0.27.2",
|
||||
"shell-quote": "^1.7.2",
|
||||
"simple-git-hooks": ">=2.0.3",
|
||||
"slate": "*",
|
||||
"slate-history": "*",
|
||||
|
@@ -8,6 +8,7 @@ import ErrorBoundary from 'react-error-boundary'
|
||||
import { Icon } from '../../components'
|
||||
|
||||
import CheckLists from '../../examples/check-lists'
|
||||
import CodeHighlighting from '../../examples/code-highlighting'
|
||||
import EditableVoids from '../../examples/editable-voids'
|
||||
import Embeds from '../../examples/embeds'
|
||||
import ForcedLayout from '../../examples/forced-layout'
|
||||
@@ -35,6 +36,7 @@ const EXAMPLES = [
|
||||
['Checklists', CheckLists, 'check-lists'],
|
||||
['Editable Voids', EditableVoids, 'editable-voids'],
|
||||
['Embeds', Embeds, 'embeds'],
|
||||
['Code Highlighting', CodeHighlighting, 'code-highlighting'],
|
||||
['Forced Layout', ForcedLayout, 'forced-layout'],
|
||||
['Hovering Toolbar', HoveringToolbar, 'hovering-toolbar'],
|
||||
['Huge Document', HugeDocument, 'huge-document'],
|
||||
|
@@ -10423,7 +10423,7 @@ shebang-regex@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
|
||||
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
|
||||
|
||||
shell-quote@1.7.2, shell-quote@^1.6.1:
|
||||
shell-quote@1.7.2, shell-quote@^1.6.1, shell-quote@^1.7.2:
|
||||
version "1.7.2"
|
||||
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2"
|
||||
integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==
|
||||
|
Reference in New Issue
Block a user