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

Developer environment - no documentation #263

Open
rickbsgu opened this issue Dec 28, 2022 · 1 comment
Open

Developer environment - no documentation #263

rickbsgu opened this issue Dec 28, 2022 · 1 comment

Comments

@rickbsgu
Copy link

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.

@rickbsgu rickbsgu changed the title Developer environment Developer environment - no documentation Dec 28, 2022
@rickbsgu
Copy link
Author

rickbsgu commented Jan 3, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant