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

file extension configuration + tests #1

Closed
wants to merge 7 commits into from

Conversation

@talon
Copy link

talon commented Nov 26, 2019

I also replaced markdown-it with a dumber vanilla JS parser and generally refactored a bit

@talon talon force-pushed the talon:feature/configuration branch from 6348b1f to e8d992e Nov 26, 2019
make file extensions configurable
README test file
parser tests
removed markdown-it
updated docs
@talon talon force-pushed the talon:feature/configuration branch from e8d992e to 37f80e1 Nov 26, 2019
talon added 4 commits Nov 26, 2019
+ npm run format
+ husky commit hook with pretty-quick
@talon

This comment has been minimized.

Copy link
Author

talon commented Dec 2, 2019

I'm not sure how to get this plugin to pull in the same presets as the project that consumes it.

for example if the consuming project uses babel-preset-env, the literate blocks should respect that. Currently that's not the case.

I've looked at babel.loadOptions but I'm failing to understand something.

https://github.com/talon/babel-plugin-literate/blob/feature/configuration/index.js#L9

@talon

This comment has been minimized.

Copy link
Author

talon commented Dec 3, 2019

Trying this suggestion from the babel slack channel

options is only contains parser options. babel.parse expects an object containing all the Babel options, not just the parser's.

You can either use parser.parse(code, options) (where import parser from "@babel/parser") or babel.parse(code, { configFile: false, parserOptions: options })

@talon

This comment has been minimized.

Copy link
Author

talon commented Dec 6, 2019

after tinkering with this further I'd like to make some different changes. Closing this for now

@talon talon closed this Dec 6, 2019
@talon talon deleted the talon:feature/configuration branch Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.