-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
docs: add project layout ref page #6151
Conversation
459ea61
to
12f58c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also not sure if the "How to access in code" part is sufficient. Please let me know how I can improve it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice start! Let's improve few details please.
</tr> | ||
<tr> | ||
<td><code>/node-modules</code> directory</td> | ||
<td>Contains Node packages as specified as dependencies in <code>package.json</code>. Update with <code>npm install</code>.</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update with
npm install
npm install
typically does not update dependencies, only install missing ones. npm update
is the command to use.
3df9d54
to
57c0cf3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice contents LGTM.
A few suggestions:
- Should we consider adding the configure files like
tsconfig.json
,/.vscode
? - For the code reference, maybe we can link to the todo example? Or add a note before the table saying all the files could be found in todo example.
@jannyHou Added an entry for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks I love the links! Nitpick: maybe also add link for the folders: controllers/, datasources/, models/, repositories/ for consistency.
Other than ^ LGTM 🚢
these sub-directories: | ||
|
||
- `src` - Node application scripts and configuration files. | ||
- `public` - Client JavaScript, HTML, and CSS files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Client side assets (JavaScript, HTML, and CSS) for the default home page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should mention dist
- which contains transpiled JavaScript code generated by npm run build
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added dist
folder under Top level app directory
, PTAL.
directory_. Within this directory the standard LoopBack 4 project structure has | ||
these sub-directories: | ||
|
||
- `src` - Node application scripts and configuration files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeScript source code
<td>A sub-directory for all repository files. See <a href="Repository.html">Repository</a>.</td> | ||
<td> </td> | ||
</tr> | ||
<tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should mention src/__tests__
?
|
||
LoopBack 4 project files and directories are in the _application root | ||
directory_. Within this directory the standard LoopBack 4 project structure has | ||
these sub-directories: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mention the project layout was created by lb4 application
command and new artifacts can be added by other lb4
commands or manually by application developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I added CLI links to each artifact.
permalink: /doc/en/lb4/Project-layout-reference.html | ||
--- | ||
|
||
LoopBack 4 project files and directories are in the _application root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have two types of projects:
- Application project (for LB4 applications)
- Extension project (for LB4 extension modules)
Should we make it explicit this layout is for LB4 applications?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can change the title as well if we need another page for extension project.
0946603
to
5889c94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @agnes512. I have a few minor comments.
I'm not sure if we also want to cover files, e.g. dockerfile, vs code related files, that are generated depends the options users select when scaffolding the application. But either way, I'm happy to have this PR land the way it is and iterate on it.
@@ -0,0 +1,129 @@ | |||
--- | |||
lang: en | |||
title: 'LoopBack 4 Application Layout Reference' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove Reference
?
Signed-off-by: Agnes Lin <[email protected]>
Closes #4847. See LB3 version for reference.
Checklist
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated👉 Check out how to submit a PR 👈