Skip to content

Commit

Permalink
#572: processed feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
basmasking committed Jan 3, 2025
1 parent 699153a commit bf5412c
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 20 deletions.
2 changes: 1 addition & 1 deletion documentation/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default defineConfig({
{
text: 'BUILD',
items: [
{ text: 'Settings', link: '/build/settings' },
{ text: 'Arguments', link: '/build/arguments' },
{ text: 'Configuration', link: '/build/configuration' }
]
},
Expand Down
File renamed without changes.
26 changes: 13 additions & 13 deletions documentation/docs/build/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
layout: doc

prev:
text: Build settings
link: /build/settings
text: Build arguments
link: /build/arguments

next:
text: Segmentation
Expand All @@ -28,25 +28,25 @@ The `jitar.json` file is a JSON file that contains the following properties:
}
```

::: 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 NOTE
::: 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.
:::

::: tip NOTE
::: 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.
:::

::: tip NOTE
The configuration also supports environment variables. They can be used by wrapping the variable name in `${}`. For example, `${source}`.
```json
{
"source": "${source}"
}
```
:::
2 changes: 1 addition & 1 deletion documentation/docs/deploy/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In Jitar's [segmentation model](/deploy/segmentation), each segment is isolated

### Resource files

Jitar will search for resource definitions files in the `resources` directory. The files are named `*.json`. Each entry defines the entry point of the `module` that should be used as a resource.
Jitar reads resource definitions files from the `resources` directory. The files are in JSON format. Each entry defines the entry point of the `module` that should be used as a resource.

The file has the following structure:

Expand Down
6 changes: 3 additions & 3 deletions documentation/docs/develop/data-sharing.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ import { modify } from './modify';
export async function test(): Promise<void>
{
// create new instance
const original = new Person( 'John Doe', 42);
const person = new Person( 'John Doe', 42);

const copy = await modify(original);
await modify(person);

console.log(copy);
console.log(person);
}
```

Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/develop/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ prev:
link: /develop/assets

next:
text: Build settings
link: /build/settings
text: Build arguments
link: /build/arguments

---

Expand Down
3 changes: 3 additions & 0 deletions packages/build/src/source/module/LocationRewriter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import type { FileManager } from '@jitar/sourcing';

import { FileHelper, LocationReplacer } from '../../utils';

// The location rewriter ensures the '.js' for all application imports and re-exports
// and appends the 'index.js' reference for all directory imports.

export default class LocationRewriter
{
readonly #sourceFileManager: FileManager;
Expand Down
3 changes: 3 additions & 0 deletions packages/sourcing/src/LocalFileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export default class LocalFileSystem implements FileSystem
// This method is synchronous because it's used in the
// LocationRewriter. This class uses a replacer function
// in a replaceAll method that only accepts synchronous functions.

// This is a limitation of the current implementation and must be
// addressed in the future.
isDirectory(location: string): boolean
{
try
Expand Down

0 comments on commit bf5412c

Please sign in to comment.