-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: add index resolution for modules, resources and segments #590
Merged
petermasking
merged 13 commits into
main
from
572-add-index-resolution-for-configuration-files-v2
Jan 3, 2025
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
58a4dc9
#572: index resolution for imports and exports
basmasking ad5a900
#572: index resolution for resources and segments
basmasking 34c5e3b
Merge branch 'main' into 572-add-index-resolution-for-configuration-f…
basmasking 7a682a0
Merge branch 'main' into 572-add-index-resolution-for-configuration-f…
basmasking b2d1d94
#572: resources and segments get their own folder
basmasking 175a2c8
#572: additional config properties added
basmasking 0f655e4
#572: the new project file manager
basmasking f26ca29
#572: implemented project file manager
basmasking ba75dc2
#572: consistency commit
basmasking 4724363
#572: updated examples with latest configs
basmasking 5b58639
#572: updated docs
basmasking 699153a
#572: last docs update
basmasking bf5412c
#572: processed feedback
basmasking File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
layout: doc | ||
|
||
prev: | ||
text: Debugging | ||
link: /develop/debugging | ||
|
||
next: | ||
text: Build configuration | ||
link: /build/configuration | ||
|
||
--- | ||
|
||
# Settings | ||
|
||
The build process accepts a few command line arguments to configure its build behavior. A fully configured command line looks like this: | ||
|
||
```bash | ||
jitar build --env-file=.env --log-level=info --config=jitar.json | ||
``` | ||
|
||
## Environment file | ||
|
||
The `--env-file` argument can be used to specify a file that contains environment variables. This is an optional argument without a default value. | ||
|
||
## Log level | ||
|
||
To control the level of logging, the optional `--log-level` argument can be used. The default for this value is `info`. A more elaborate description of the log levels can be found in the [logging](../monitor/logging) section. | ||
|
||
## Configuration file | ||
|
||
To control the input and output of the build process. The `--config` argument can be used to specify a configuration file. This is an optional argument with the default value `jitar.json`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
layout: doc | ||
|
||
prev: | ||
text: Build arguments | ||
link: /build/arguments | ||
|
||
next: | ||
text: Segmentation | ||
link: /deploy/segmentation | ||
|
||
--- | ||
|
||
# Configuration | ||
|
||
The jitar build process is configured using a `jitar.json` file. This file is optional and defines the location of the `source`, `target`, `segments`, and `resources` folders. These values are used to split the application in separate deployable bundles and create the necessary configuration files for the jitar runtime. | ||
|
||
## Jitar configuration file | ||
|
||
The `jitar.json` file is a JSON file that contains the following properties: | ||
|
||
```json | ||
{ | ||
"source": "./src", | ||
"target": "./dist", | ||
"segments": "./segments", | ||
"resources": "./resources" | ||
} | ||
``` | ||
|
||
::: tip INFO | ||
The configuration also supports environment variables. They can be used by wrapping the variable name in `${}`. For example, `${source}`. | ||
```json | ||
{ | ||
"source": "${source}" | ||
} | ||
``` | ||
::: | ||
|
||
There are four properties in the configuration file: | ||
* `source` - the location of the source files (default `./src`). | ||
* `target` - the location of the target files (default `./dist`). | ||
* `segments` - the location of the segment configuration files (default `./segments`). | ||
* `resources` - the location of the resource files (default `./resources`). | ||
|
||
::: tip | ||
For a TypeScript project, the `source` folder should be the target folder after transpilation, so it should be `./dist` instead of `./src`. The `target` folder can be the same as the `source` folder in this case, but it can also be a different folder. | ||
::: | ||
|
||
::: warning IMPORTANT | ||
The build process deletes the files in the `target` folder during the build process. Make sure that it doesn't point to the `src` folder. | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ | ||
"source": "./dist", | ||
"target": "./.jitar" | ||
"target": "./.jitar", | ||
"segments": "./segments", | ||
"resources": "./resources" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ | ||
"./database" | ||
] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is a part of our future-proof vision. Should we reflect it in the Jitar docs?
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.
Created the following Issue so we can keep track of these items.