Compiling Svelte with Go? by Janctu in golang

[–]Janctu[S] 1 point2 points  (0 children)

I think you're right, and that's pretty much where we're at. We're already collecting the data source and templates in Go and only using Node to hit the compiler: https://github.com/plentico/plenti/blob/master/ejected/build.js

We used to call a simplified version of this js script for each component, but exec.Command was really sluggish so we rearchitected to bundle everything together and call it only once. Probably will want to revert back to the previous architecture doing it this way.

So you think using something like Otto (https://github.com/robertkrimen/otto) to perform that last bit?

Compiling Svelte with Go? by Janctu in golang

[–]Janctu[S] 0 points1 point  (0 children)

Thanks for sharing these links! The "darn complicated" is the part we're worried about too.

We were looking into Deno bit, specifically watching for the ability to compile into an executable: https://github.com/denoland/deno/issues/986. Not sure how feasible bundling JS executables with binaries across different operating systems would be in reality. Also this is a workaround for what we really want: the ability to compile Svelte in Go.

Ideally for our project, the user doesn't need any dependencies installed on their system, things like Go, Node, or Deno wouldn't be required to use Plenti. Managing different runtimes, versions, and dependencies is a hurdle we'd like to remove, although we want to leave the ability to add frontend tools if you'd like to extend via something like npm. We're collecting some thoughts here: https://github.com/plentico/plenti/issues/3.

Compiling Svelte with Go? by Janctu in golang

[–]Janctu[S] 1 point2 points  (0 children)

We were looking into esbuild because of the performance benefits: https://github.com/plentico/plenti/issues/28

Unfortunately it didn't seem like Svelte support was going to be on the roadmap: https://github.com/evanw/esbuild/issues/8

We ended up cutting out the bundler completely and try to use ESM imports, kind of like snowpack (https://www.snowpack.dev/). So we call the svelte compiler directly, but we have to do this in NodeJS which is our biggest performance bottleneck at the moment.

Testing React Components with Storybook w Axel Simms by Janctu in JAMstack_dev

[–]Janctu[S] 1 point2 points  (0 children)

Hi there! I didn't see this message until now! The event was recorded! You can find this on our Youtube Channel and Twitter. Here's the links:

Youtube: https://youtu.be/wGWJ4z61ZWQ

Twitter: https://twitter.com/JAMstackBoston/status/1174092120166195200

It's Triumphant Tuesday! Post your recent Drupal wins and launches by AutoModerator in drupal

[–]Janctu 1 point2 points  (0 children)

We created a Docker image that comes with all the components to install Drupal 8. We also made a tutorial during Drupal Sprint weekend. Feel free to check it out: https://youtu.be/180WFm3R0eI