Conversation
reword 53d0916 test: Green test without frontmatter
| "tsconfig.json" | ||
| ], | ||
| "dependencies": { | ||
| "gray-matter": "^4.0.3", |
There was a problem hiding this comment.
Can we potentially use an optional dependency somehow here? Nearly every user that use my plugin don't use frontmatter. You are the first case in 2-3 years.
Adding a direct dependency would result in not used content for thousands of users.
There was a problem hiding this comment.
I might experiment, but gray-matter is a relatively small lib, so I don't know if it's worth the trouble...
What do you think?
j.langeveld@nicagini ~/git/github/jlangeveld/plugin-pug
> du -sh node_modules/gray-matter/
96K node_modules/gray-matter/
[task/Make_frontmatter-parsing_optional]
j.langeveld@nicagini ~/git/github/jlangeveld/plugin-pug
> du -sh node_modules/
190M node_modules/There was a problem hiding this comment.
It brings sub-dependencies with it... https://github.com/jonschlinkert/gray-matter/blob/a5726b04f3167fadc764241deb545518c454eb82/package.json#L36-L41
And these have sub-sub-deps and so on.
There was a problem hiding this comment.
Oooooohhhhhhhh.... yes.
I should have realised.
j.langeveld@nicagini ~/git/github/gray-matter
> du -sh node_modules/
32M node_modules/
I'll see what I can do.
|
Maybe copy this https://github.com/prettier/prettier/blob/f2244bdc8621c0a001e3717f595bc8fd8653cce7/src/utils/front-matter/parse.js#L50? Or should Prettier expose it? |
Sorry for being off the radar, got a bit swamped... However, I got hung up trying to convince typescript to accept this javascript code without erorring out on missing type declarations. |
|
As an 11ty user, I would be very interested by this plugin supporting pug with frontmatter. @jlangeveld parse.js has been converted to typescript since then. Will this solve your problem? I don't think I am proficient enough to pick up the ball. |
|
formatting frontmatter would be nice too. |
|
@taniki I'm still here to support or lead |
|
@Shinigami92 I opened up a new pull request. I don't know if there is a way for me to push directly into @jlangeveld branch. I am a bit strained on time. It is not complete. I still have to figure out to import and format the frontmatter part whatever language it uses. This file seems to be what we need. |
Closes #389
First round - yaml frontmatter is being parsed en re-inserted.
Graymatter supports json out of the box, so I want to work that in too...