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

Fix Vue, test and document rest #1338

Merged
merged 6 commits into from
Nov 19, 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
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ packages/gatsby-theme-mdx/src/components/search.js

packages/remark-mdx

# tmp
# To do: Vue should be checked.
examples/vue
packages/vue

readme.md
4 changes: 1 addition & 3 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@ settings:
version: 16.3.2

overrides:
- files: '*.md'
extends: plugin:mdx/recommended

- files: '*.mdx'
extends:
- plugin:mdx/recommended
- plugin:mdx/overrides
rules:
import/no-extraneous-dependencies: 0
prettier/prettier: 0
ChristianMurphy marked this conversation as resolved.
Show resolved Hide resolved

- files:
- '**/test/**/*.js'
Expand Down
37 changes: 8 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,25 @@ jobs:
name: Build and Test on ${{ matrix.os }} with Node.js ${{ matrix.node }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [10, 14]
os:
- ubuntu-latest
- windows-latest
node:
- 10
- 14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node }}

- name: Setup yarn
if: matrix.os != 'windows-latest'
run: |
curl -o- -L https://yarnpkg.com/install.sh | bash
export PATH="$HOME/.yarn/bin:$PATH"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node }}-yarn-

- name: Install Dependencies
- name: Install
run: yarn --frozen-lockfile
env:
CI: 'true'

- name: Build
if: matrix.os != 'windows-latest'
run: yarn build

- name: Test
run: yarn test

# To do: macos isn’t used anymore
- name: Publish CI tag to npm
if: matrix.node == 12 && matrix.os == 'macOS-latest' && github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/lint.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/types.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ public
.npmrc
.nyc_output/
coverage/
.yarn
14 changes: 1 addition & 13 deletions .remarkrc.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
const unified = require('unified')
const english = require('retext-english')
const wooorm = require('retext-preset-wooorm')

module.exports = {
plugins: [
'./packages/remark-mdx',
'./packages/remark-mdxjs',
'preset-wooorm',
'preset-prettier',
[
'retext',
unified()
.use(english)
.use(wooorm)
.use({
plugins: [[require('retext-sentence-spacing'), false]]
})
],
['retext', false],
['validate-links', false]
]
}
5 changes: 2 additions & 3 deletions docs/advanced/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ improve the developer experience for TypeScript users.
- `@mdx-js/react`
- `@mdx-js/runtime`
- `@mdx-js/vue`
- `@mdx-js/util`
- `remark-mdx`
- `remark-mdx-remove-exports`
- `remark-mdx-remove-imports`
Expand All @@ -26,15 +25,15 @@ Include types, no additional setup needed.

### React and Webpack

Add an _mdx.d.ts_ file with the below content, and ensure it is included by the _tsconfig.json_.
Add an `mdx.d.ts` file with the below content, and ensure it is included by the `tsconfig.json`.

```tsx
/// <reference types="@mdx-js/loader" />
```

### Vue and Webpack

Add an _mdx.d.ts_ file with the below content, and ensure it is included by the _tsconfig.json_.
Add an `mdx.d.ts` file with the below content, and ensure it is included by the `tsconfig.json`.

```tsx
/// <reference types="@mdx-js/vue-loader" />
Expand Down
Loading