Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Node and dependent packages to the latest #118

Merged
merged 3 commits into from
Jan 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.13.1
12.14.1
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

## [Unreleased]

### Added

- Presenter view in the exported HTML, provided by [Marp CLI v0.17.0](https://github.com/marp-team/marp-cli/releases/v0.17.0) ([#118](https://github.com/marp-team/marp-vscode/pull/118))

### Changed

- Upgrade Marp Core to [v1.0.1](https://github.com/marp-team/marp-core/releases/v1.0.1) and Marp CLI to [v0.17.0](https://github.com/marp-team/marp-cli/releases/v0.17.0) ([#118](https://github.com/marp-team/marp-vscode/pull/118))
- Upgrade development Node and dependent packages to the latest version ([#111](https://github.com/marp-team/marp-vscode/pull/111), [#118](https://github.com/marp-team/marp-vscode/pull/118))
- Update community health files ([#107](https://github.com/marp-team/marp-vscode/pull/107))
- Upgrade development Node and dependent packages to the latest version ([#111](https://github.com/marp-team/marp-vscode/pull/111))

## v0.11.2 - 2019-11-18

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ You can also execute command from the Command Palette (<kbd>F1</kbd> or <kbd>Ctr

Default file type can choose by `markdown.marp.exportType` preference.

> ⚠️ Export except HTML requires to install [Google Chrome](https://www.google.com/chrome/) (or [Chromium](https://www.chromium.org/)). You may also specify the custom path for Chrome and Chromium-based browser by preference `markdown.marp.chromePath` (e.g. [Microsoft Edge Insider](https://www.microsoftedgeinsider.com/)).
> ⚠️ Export except HTML requires to install [Google Chrome](https://www.google.com/chrome/) (or [Chromium](https://www.chromium.org/)). You may also specify the custom path for Chrome and Chromium-based browser by preference `markdown.marp.chromePath` (e.g. [Microsoft Edge](https://www.microsoft.com/edge)).

### Use custom theme

Expand Down
31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,13 @@
"watch": "rollup -w -c ./rollup.config.js"
},
"devDependencies": {
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-node-resolve": "^6.0.0",
"@rollup/plugin-alias": "^3.0.0",
"@rollup/plugin-commonjs": "^11.0.1",
"@rollup/plugin-json": "^4.0.1",
"@rollup/plugin-node-resolve": "^7.0.0",
"@rollup/plugin-typescript": "^2.1.0",
"@types/cheerio": "^0.22.15",
"@types/jest": "^24.0.23",
"@types/jest": "^24.9.0",
"@types/lodash.debounce": "^4.0.6",
"@types/markdown-it": "^0.0.9",
"@types/vscode": "~1.36.0",
Expand All @@ -223,32 +226,30 @@
"jest-junit": "^10.0.0",
"lodash.debounce": "^4.0.8",
"markdown-it": "^10.0.0",
"nanoid": "^2.1.7",
"nanoid": "^2.1.9",
"npm-run-all": "^4.1.5",
"prettier": "^1.19.1",
"rehype-parse": "^6.0.2",
"remark": "^11.0.2",
"remark-parse": "^7.0.2",
"rimraf": "^3.0.0",
"rollup": "^1.27.12",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-terser": "^5.1.3",
"rollup-plugin-typescript": "^1.0.1",
"stylelint": "^12.0.0",
"stylelint-config-prettier": "^8.0.0",
"rollup": "^1.29.1",
"rollup-plugin-terser": "^5.2.0",
"stylelint": "^13.0.0",
"stylelint-config-prettier": "^8.0.1",
"stylelint-config-standard": "^19.0.0",
"ts-jest": "^24.2.0",
"ts-jest": "^24.3.0",
"tslint": "^5.20.1",
"tslint-config-airbnb": "^5.11.2",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.7.3",
"typescript": "^3.7.5",
"unified": "^8.4.2",
"unist-util-visit": "^2.0.1",
"yaml": "^1.7.2"
},
"dependencies": {
"@marp-team/marp-cli": "^0.16.2",
"@marp-team/marp-core": "^0.15.2",
"axios": "^0.19.0"
"@marp-team/marp-cli": "^0.17.0",
"@marp-team/marp-core": "^1.0.1",
"axios": "^0.19.1"
}
}
14 changes: 12 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
import path from 'path'
import alias from '@rollup/plugin-alias'
import commonjs from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
import nodeResolve from '@rollup/plugin-node-resolve'
import typescript from '@rollup/plugin-typescript'
import builtinModules from 'builtin-modules'
import commonjs from 'rollup-plugin-commonjs'
import { terser } from 'rollup-plugin-terser'
import typescript from 'rollup-plugin-typescript'
import pkg from './package.json'

const plugins = [
alias({
entries: {
// TODO: Remove aliasing if rollup bug was fixed
// @see https://github.com/rollup/plugins/issues/102
'@marp-team/marp-core/browser': require.resolve(
'@marp-team/marp-core/lib/browser.cjs'
),
},
}),
json({ preferConst: true }),
nodeResolve({ mainFields: ['module', 'jsnext:main', 'main'] }),
commonjs(),
Expand Down
8 changes: 4 additions & 4 deletions src/preview.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @jest-environment jsdom */
import browserCjs from '@marp-team/marp-core/lib/browser.cjs'
import browser from '@marp-team/marp-core/browser'
import preview from './preview'

jest.mock('@marp-team/marp-core/lib/browser.cjs')
jest.mock('@marp-team/marp-core/browser')

beforeEach(() => {
document.head.innerHTML = ''
Expand All @@ -13,15 +13,15 @@ beforeEach(() => {
describe('Preview HTML', () => {
it('does not call browser context JS when HTML has not Marp slide', () => {
preview()
expect(browserCjs).not.toBeCalled()
expect(browser).not.toBeCalled()
})

it('calls only browser context JS when HTML has Marp slide', () => {
document.body.innerHTML = '<div id="marp-vscode"></div>'

preview()
expect(document.body.classList.contains('marp-vscode')).toBe(true)
expect(browserCjs).toBeCalled()
expect(browser).toBeCalled()
})

it('removes all styles excepted Marp when HTML has Marp slide', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import browserCjs from '@marp-team/marp-core/lib/browser.cjs'
import browser from '@marp-team/marp-core/browser'

export default function preview() {
const marpVscode = document.getElementById('marp-vscode')
Expand All @@ -17,6 +17,6 @@ export default function preview() {
links.forEach(elm => elm.remove())

// Run Marp observer
browserCjs()
browser()
}
}
Loading