Skip to content

fix frontmatter exports#67

Merged
antfu merged 24 commits intoantfu:mainfrom
yankeeinlondon:feature/feature/fix-exports
Apr 23, 2022
Merged

fix frontmatter exports#67
antfu merged 24 commits intoantfu:mainfrom
yankeeinlondon:feature/feature/fix-exports

Conversation

@yankeeinlondon
Copy link
Copy Markdown
Collaborator

this brings back the ability to import frontmatter properties via an import:

import Component, { frontmatter } from 'vite-plugin-md'

It also includes all tests needed to demonstrate this functionality.

yankeeinlondon and others added 24 commits March 7, 2022 14:56
feature: added better type hinting for Meta properties and Frontmatter properties

fix: fix type errors found in "head.ts"
- refactored to better isolate builders and include clearer pipeline operation
…to ensure full engagement with useHead functionality
chore: improved testing to include testing for proper exports
@yankeeinlondon yankeeinlondon deleted the feature/feature/fix-exports branch April 23, 2022 00:11
@yankeeinlondon yankeeinlondon restored the feature/feature/fix-exports branch April 23, 2022 04:07
@yankeeinlondon
Copy link
Copy Markdown
Collaborator Author

not sure what happened but this PR was closed. @antfu I can merge this but I assumed you'd want to have a review of it first?

@antfu antfu merged commit fd664e5 into antfu:main Apr 23, 2022
yankeeinlondon added a commit to yankeeinlondon/vite-plugin-md that referenced this pull request May 24, 2022
- fix: fix type errors found in "head.ts"
- test: cypress testing works in very limited way but not when running in "tabular layout"
- test: vitest has been isolated from cypress symbol collisions
- fix: removed cypress cruft from their install process
- feature: added better type hinting for Meta properties and Frontmatter properties

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>

chore: update deps

docs: update README.md (antfu#68)

docs: import quote (antfu#70)

fix: loss information from <script> in md

chore: fix typo (antfu#73)
yankeeinlondon added a commit that referenced this pull request May 24, 2022
* chore: updated to latest dependencies

* chore: added files to help contributors better stick to existing standards

* feature: added GreyMatterOptions interface

feature: added better type hinting for Meta properties and Frontmatter properties

fix: fix type errors found in "head.ts"

* chore: add simple test to show usage

* reverted prettier and linter configuration

* chore: formating

* chore: initial implementation and tests

* Feature/baseline builders (#1)

- refactored to better isolate builders and include clearer pipeline operation

* fix: fixed faulty merge on options resolver

* fix: fixed the regression in README; makes it more like current version

* chore: updated docs for MetaBuilder

* fix: remove reference to `replaceAll` to remove testing errors

* chore: improved BuilderApi docs

* chore: `@types` folder to `types`

* fix: ensures that wrapper classes are set regardless of whether wrapperComponent property is used or not

* test: added tests for HEAD functionality and re-introduce code block to ensure full engagement with useHead functionality

* test: added tests to test behavior of exposeFrontmatter prop on Vue2 and Vue3

* fix: fixed lint regression

* refactor: changed the pipeline to support async tasks

* chore: conversion of whole pipeline to TaskEither functions

* chore: pipeline fully converted to async

* chore: switch all tests over to use of async pipeline

* chore: added happy-dom utility's and started line number highlighting

* chore: all advanced tests for wrapWithText() are passing

* chore: better abstractions for happy-dom utilities

* chore: adjusted doc structure and simplified props parsing

* chore: refinements to happy-wrapper

* chore: mild DOM structure improvements in code layout

* fix: got frontmatter exports working again!
chore: improved testing to include testing for proper exports

* chore: formatting updates

* test: updated snapshots

* chore: refactor of example app

* chore: improved some core tests around script hoisting, head functionality,
and the frontmatter pre-processor

refactor: improvements to happy-wrapper library and use of these improvements to
improve the code builder's transform pipeline

* chore: tabular formatting 95% working

chore: add test coverage testing
refactor: removed shiki code

* chore: tuned the prism color themes a bit
chore: attempts to get Cypress component tests working

* - fix: frontmatter exports (#67)
- fix: fix type errors found in "head.ts"
- test: cypress testing works in very limited way but not when running in "tabular layout"
- test: vitest has been isolated from cypress symbol collisions
- fix: removed cypress cruft from their install process
- feature: added better type hinting for Meta properties and Frontmatter properties

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>

chore: update deps

docs: update README.md (#68)

docs: import quote (#70)

fix: loss information from <script> in md

chore: fix typo (#73)

* chore: lint check/fiix, update happy-dom

* chore: added build dependency to build happy-wrapper

* chore: removed "happy-wrapper" to it's own repo

* chore: remove extraneous global link file

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
yankeeinlondon added a commit that referenced this pull request Jun 20, 2022
* chore: updated to latest dependencies

* chore: added files to help contributors better stick to existing standards

* feature: added GreyMatterOptions interface

feature: added better type hinting for Meta properties and Frontmatter properties

fix: fix type errors found in "head.ts"

* chore: add simple test to show usage

* reverted prettier and linter configuration

* chore: formating

* chore: initial implementation and tests

* Feature/baseline builders (#1)

- refactored to better isolate builders and include clearer pipeline operation

* fix: fixed faulty merge on options resolver

* fix: fixed the regression in README; makes it more like current version

* chore: updated docs for MetaBuilder

* fix: remove reference to `replaceAll` to remove testing errors

* chore: improved BuilderApi docs

* chore: `@types` folder to `types`

* fix: ensures that wrapper classes are set regardless of whether wrapperComponent property is used or not

* test: added tests for HEAD functionality and re-introduce code block to ensure full engagement with useHead functionality

* test: added tests to test behavior of exposeFrontmatter prop on Vue2 and Vue3

* fix: fixed lint regression

* refactor: changed the pipeline to support async tasks

* chore: conversion of whole pipeline to TaskEither functions

* chore: pipeline fully converted to async

* chore: switch all tests over to use of async pipeline

* chore: added happy-dom utility's and started line number highlighting

* chore: all advanced tests for wrapWithText() are passing

* chore: better abstractions for happy-dom utilities

* chore: adjusted doc structure and simplified props parsing

* chore: refinements to happy-wrapper

* chore: mild DOM structure improvements in code layout

* fix: got frontmatter exports working again!
chore: improved testing to include testing for proper exports

* chore: formatting updates

* test: updated snapshots

* chore: refactor of example app

* chore: improved some core tests around script hoisting, head functionality,
and the frontmatter pre-processor

refactor: improvements to happy-wrapper library and use of these improvements to
improve the code builder's transform pipeline

* chore: tabular formatting 95% working

chore: add test coverage testing
refactor: removed shiki code

* chore: tuned the prism color themes a bit
chore: attempts to get Cypress component tests working

* - fix: frontmatter exports (#67)
- fix: fix type errors found in "head.ts"
- test: cypress testing works in very limited way but not when running in "tabular layout"
- test: vitest has been isolated from cypress symbol collisions
- fix: removed cypress cruft from their install process
- feature: added better type hinting for Meta properties and Frontmatter properties

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>

chore: update deps

docs: update README.md (#68)

docs: import quote (#70)

fix: loss information from <script> in md

chore: fix typo (#73)

* chore: lint check/fiix, update happy-dom

* chore: added build dependency to build happy-wrapper

* chore: removed "happy-wrapper" to it's own repo

* chore: remove extraneous global link file

* chore: exposed builder API symbols to empower external builders

chore: started to add mechanism for Builders to declare dependencies on other builders

* chore: further version updates

* fix: the routing meta, name, and path are all working now

* fix: fixed script-hoisting to ensure any additional "<script setup>" blocks lines are brought into the singular block and in an order which ensures imports are first

refactor: restructured some of the later stage block names in the builder pipeline to improve code readability and allow better testing

chore: started to add "component tests" section which uses happy-dom; removed cypress for now

* fix: fixes issue Failed to use Vue component in markdown #90

* refactor: removed deprecated and duplicative config for excerpt handling

* refactor: moved the default and override value feature into core from meta builder

* fix: base styling is available but not used by default

* test: added testing for styles (or lack thereof)

chore: make sure user can set styles but that default is always to NOT have styles

test: add more component tests that test the end-state of being able to import frontmatter and excerpt variables

* chore: delint tests

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants