Elderjs / elderjs

Elder.js is an opinionated static site generator and web framework for Svelte built with SEO in mind.

Home Page:https://elderguide.com/tech/elderjs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Developer environment - no documentation

rickbsgu opened this issue · comments

There are no instructions/documentation on how to set up a developer environment, specifically for plugins, but for elderjs in general.

The immediate goal is to work on a plugin - which, when I try to link it so it's on my local file system, results in a bunch of ESM errors.

I've created a couple of discord msgs in the channel, starting with this one, but haven't gotten any responses, at all.

Currently stuck without some instructions.

After going down a few rabbit holes, I got a development environment to work. Here's what I found:

If you want to work on a current plugin:

  • clone the repo: Elderjs/plugins
  • (you might want to fork it so you can keep it current. If you fork it, uncheck 'Copy the master branch only')
  • in your clone, invoke git checkout releases/v1.3.10
  • cd into the package you want to work on (i.e. packages/markdown)
  • run npm install
    At this point, you can set up the link. Follow the directions for npm link. Note that npm link DOES NOT update the package.json in your app project. You need to add the entry for the plugin manually, with the correct version number (elderjs scans the plugin's package.json?)

If you want to work on elderjs:

  • clone this repo
  • the master branch should be good (check the package.json and make sure the version is 1.7.5)
  • invoke npm install (this is hanging near completion in my environment [Mac m1], but it seems to have done enough to work)
  • invoke npm run prepare
    You can now link it. Again follow the directions above. If you want the links for both elderjs and plugins, you have to do them on one line, e.g.: (in your app directory) npm link @elderjs/elderjs @elderjs/plugin-markdown - doing just one will wipe out the other.
  • after every change in the elderjs project, you need to rerun npm run prepare for your app project to see the changes.

For both projects, be very careful about the git branch. The active branch may be set to an experimental branch that someone has been working on, and inadvertently checked it in without resetting the current branch. I found the master branches to be unreliable. Also, I found in the plugin/packages/markdown branch, the elderjs project had been specified as a local file in the package.json file. Watch that.

That's how I got it to work. Somebody (anybody) can correct me or fill in some more information - that would be great.