Open cossssmin opened 8 months ago
@cossssmin I'm glad you can do it, thank you!
Thanks, will get started and let you know when it's ready for review.
Did you have any plans for it? We could add them in this refactor.
Did you have any plans for it? We could add them in this refactor.
There were a couple of ideas:
tsup
or vitejs
as a collector, prettier
rules, typescript
, vscode
/idea
, ci/cd
(install, test, optional build, publish by tag or after the merge), turborepo
OK, I'd start on it and when I'm done you could add those maybe? Or do you prefer we launch a major version first and then add those ideas?
OK, I'd start on it and when I'm done you could add those maybe? Or do you prefer we launch a major version first and then add those ideas?
Rather, as you prefer, these are the best ideas)
Could we take this opportunity to think about what options we have for replacing node:vm
so that the plugin could be used in a browser environment? Would Function
work?
This would be a game-changer for frameworks like Maizzle, you could run the entire PostHTML build chain right in the browser, no serverless/Lambdas needed.
It is necessary to explore this direction, in the first approximation it looks like vm-browserify
I was looking at the Alpine.js evaluator the other day, maybe something like this would be enough?
https://github.com/alpinejs/alpine/blob/main/packages/alpinejs/src/evaluator.js
Didn't know about vm-browserify
, looks like it's very popular but it's only for the browser and it creates an <iframe>
for each code execution which leads to other issues like web workers not working.
This also looks interesting, it uses @babel/parser
to parse expressions:
@Scrum I'd like to work on a new major release for posthtml-expressions that would include:
Please let me know if you're OK with this and I'll start work on the PR. Thanks!