loopback-next icon indicating copy to clipboard operation
loopback-next copied to clipboard

Move packages/examples to main folder

Open cblazo opened this issue 8 years ago • 3 comments

Description / Steps to reproduce / Feature proposal

Issue #836 brought the examples back into the monorepo (/packages/examples). However, the packages folder is already substantially sized. A suggestion is to make a dedicated examples folder in the main project folder, as these have nothing to do with the actual LoopBack REST API logic in the packages folder, but just show how to get started or work with LoopBack 4.

Current Behavior

The example folders (example-getting-started, example-hello-world, example-log-extension, example-rpc-server) are in the packages folder.

Expected Behavior

The example folders are in the main folder and the packages folder is smaller and more organized.

cblazo avatar Apr 03 '18 08:04 cblazo

@cblazo , thanks for your feedback. Coincidently, @bajtos had proposed the same thing about a week ago!

..move example projects from packages/example-{name} to examples/{name}. For example, packages/example-rpc-server will be moved to examples/rpc-server

Would you like to submit a PR?

dhmlau avatar Apr 03 '18 14:04 dhmlau

I was working in collaboration with @cblazo on submitting a PR but we ran into a problem with the generators in the cli package. The clone-example generator requires downloading this source code which will have the old example structure for now, and thus the clone-example tests fail until the PR is merged. Should I just ignore the failing tests and submit the PR anyway?

jwooning avatar Apr 04 '18 07:04 jwooning

@jwooning @cblazo As long as you update the relevant code in the CLI to fetch from the right folder it is OK for some of the tests to fail. That is unfortunately the case any time we have a major refactor such as this one because of how the CLI extracts examples from the monorepo.

Once you have a PR up I can help to land it :) Thank you for the help!

virkt25 avatar Apr 04 '18 14:04 virkt25