Skip to content

Commit

Permalink
feat: re-architect to a plugin model
Browse files Browse the repository at this point in the history
  • Loading branch information
petyosi committed Aug 11, 2023
1 parent fa17303 commit a105b1a
Show file tree
Hide file tree
Showing 267 changed files with 29,443 additions and 16,924 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports = {
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'no-console': ['warn', { allow: ['warn', 'error'] }],
Expand Down
30 changes: 6 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
branches:
- main
- alpha
- beta

permissions:
contents: read # for checkout
Expand All @@ -25,36 +27,16 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "lts/*"

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
cache: 'npm'

- name: Install dependencies
run: pnpm install
run: npm install --legacy-peer-deps

- name: Test
run: pnpm test
run: npm run test

- name: Build
run: pnpm build
run: npm run build

- name: Release
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ docs
temp
etc
uploads
tsdoc-metadata.json
1 change: 0 additions & 1 deletion .ladle/components.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion .ladle/config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default {
stories: 'src/stories/*.stories.tsx',
stories: ['src/examples/*.tsx', '!src/examples/_boilerplate.tsx'],
}
4 changes: 0 additions & 4 deletions .ladle/style.css

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ The project is still in its infancy, and I would love to get additional perspect

Bundling is done with Vite, and tests are using Vitest. Ladle is used for examples.

To preview the available examples in the browser, run `pnpm dev`.
To preview the available examples in the browser, run `npm dev`.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@

> Because markdown editing can be even more delightful.
MDXEditor is an open-source React component that allows users to author markdown documents naturally. Just like in Google docs or Notion. [See the live demo](https://mdxeditor.dev/editor/demo) that has the default features turned on. It supports the core markdown syntax and certain extensions, including tables, images, code blocks, etc. It also allows users to edit JSX components with a dedicated property editor.
MDXEditor is an open-source React component that allows users to author markdown documents naturally. Just like in Google docs or Notion. [See the live demo](https://mdxeditor.dev/editor/demo) that has all features turned on.
The component supports the core markdown syntax and certain extensions, including tables, images, code blocks, etc. It also allows users to edit JSX components with a built-in JSX editor or a custom one.

```jsx
import {MDXEditor} from '@mdxeditor/editor';
import {MDXEditor, headingsPlugin()} from '@mdxeditor/editor';

export default function App() {
return <MDXEditor markdown={'# Hello World'} />;
return <MDXEditor markdown={'# Hello World'} plugins={[headingsPlugin()]} />;
}
```
## Get Started
Expand Down
Loading

0 comments on commit a105b1a

Please sign in to comment.