mirror of
https://github.com/marp-team/marp.git
synced 2024-11-30 09:46:32 +03:00
Upgrade Node and dependent packages
This commit is contained in:
parent
04ddec1a40
commit
66a88a2ad0
@ -69,7 +69,7 @@ jobs:
|
||||
test-node:
|
||||
executor:
|
||||
name: node
|
||||
version: '12.16.1' # Specify LTS version for development
|
||||
version: '12.16.3' # Specify LTS version for development
|
||||
steps:
|
||||
- test
|
||||
|
||||
|
16
package.json
16
package.json
@ -22,8 +22,7 @@
|
||||
],
|
||||
"prettier": {
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5"
|
||||
"singleQuote": true
|
||||
},
|
||||
"scripts": {
|
||||
"check:format": "yarn -s format -c",
|
||||
@ -32,13 +31,10 @@
|
||||
"website": "yarn -s workspace @marp-team/marp-website serve"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-prettier": "^6.10.0",
|
||||
"eslint-plugin-react": "^7.19.0",
|
||||
"lerna": "^3.20.2",
|
||||
"prettier": "^1.19.1"
|
||||
},
|
||||
"resolutions": {
|
||||
"**/optimist/minimist": "^0.2.1"
|
||||
"eslint": "^7.0.0",
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"eslint-plugin-react": "^7.20.0",
|
||||
"lerna": "^3.21.0",
|
||||
"prettier": "^2.0.5"
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
"@static/charge": "^1.7.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"github-slugger": "^1.3.0",
|
||||
"highlight.js": "^9.18.1",
|
||||
"highlight.js": "^10.0.3",
|
||||
"react-innertext": "^1.1.5"
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import { Layout, contentStyle, generateTitle } from './layout.jsx'
|
||||
|
||||
export default function Blog({ environment, pages }) {
|
||||
const articles = pages
|
||||
.filter(p => p.path.startsWith('/blog/') && p.meta.title && p.meta.date)
|
||||
.filter((p) => p.path.startsWith('/blog/') && p.meta.title && p.meta.date)
|
||||
.sort((a, b) => new Date(b.meta.date) - new Date(a.meta.date))
|
||||
|
||||
return (
|
||||
@ -24,7 +24,7 @@ export default function Blog({ environment, pages }) {
|
||||
>
|
||||
Blog
|
||||
</Heading>
|
||||
{articles.map(article => (
|
||||
{articles.map((article) => (
|
||||
<section
|
||||
key={article.path}
|
||||
css={css`
|
||||
|
@ -236,12 +236,12 @@ export const BlogLayout = ({ children, meta }) => {
|
||||
|
||||
// Slugified headings
|
||||
const slugger = new GitHubSlugger()
|
||||
const h1 = props => <Heading {...props} level={1} slugger={slugger} />
|
||||
const h2 = props => <Heading {...props} level={2} slugger={slugger} />
|
||||
const h3 = props => <Heading {...props} level={3} slugger={slugger} />
|
||||
const h4 = props => <Heading {...props} level={4} slugger={slugger} />
|
||||
const h5 = props => <Heading {...props} level={5} slugger={slugger} />
|
||||
const h6 = props => <Heading {...props} level={6} slugger={slugger} />
|
||||
const h1 = (props) => <Heading {...props} level={1} slugger={slugger} />
|
||||
const h2 = (props) => <Heading {...props} level={2} slugger={slugger} />
|
||||
const h3 = (props) => <Heading {...props} level={3} slugger={slugger} />
|
||||
const h4 = (props) => <Heading {...props} level={4} slugger={slugger} />
|
||||
const h5 = (props) => <Heading {...props} level={5} slugger={slugger} />
|
||||
const h6 = (props) => <Heading {...props} level={6} slugger={slugger} />
|
||||
|
||||
return (
|
||||
<Layout
|
||||
|
@ -96,7 +96,7 @@ const colors = {
|
||||
},
|
||||
}
|
||||
|
||||
export const Button = props => {
|
||||
export const Button = (props) => {
|
||||
const color = colors[props.color] || colors.default
|
||||
const style = [
|
||||
button,
|
||||
|
@ -19,14 +19,14 @@ const container = css`
|
||||
display: inline-block;
|
||||
`
|
||||
|
||||
export const Marp = props => {
|
||||
export const Marp = (props) => {
|
||||
const marp = new MarpCore({
|
||||
container: null,
|
||||
script: false,
|
||||
printable: false,
|
||||
})
|
||||
|
||||
marp.markdown.normalizeLink = url => resolvePath(url)
|
||||
marp.markdown.normalizeLink = (url) => resolvePath(url)
|
||||
|
||||
const rendered = marp.render(props.markdown, { htmlAsArray: true })
|
||||
|
||||
|
@ -6,7 +6,7 @@ import { Button } from '../components/button.js.jsx'
|
||||
import { Code } from '../components/code.js.jsx'
|
||||
import { Marp } from '../components/marp.js.jsx'
|
||||
|
||||
const example = (resolver = v => v) =>
|
||||
const example = (resolver = (v) => v) =>
|
||||
`
|
||||
---
|
||||
theme: gaia
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { css, jsx } from '@emotion/core'
|
||||
import { contentStyle } from '../layout.jsx'
|
||||
|
||||
const FeatureSections = props => (
|
||||
const FeatureSections = (props) => (
|
||||
<section {...props}>
|
||||
<section>
|
||||
<figure>
|
||||
|
@ -8,7 +8,7 @@ export const defaultImage = '/assets/og-image.png'
|
||||
export const generateTitle = (...breadcrumbs) =>
|
||||
['Marp', ...breadcrumbs].reverse().join(' | ')
|
||||
|
||||
export const resolvePath = path =>
|
||||
export const resolvePath = (path) =>
|
||||
new URL(
|
||||
path,
|
||||
(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user