@absolutejs/absolute 0.19.0-beta.1008 → 0.19.0-beta.1009
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/index.js +32 -1
- package/dist/index.js.map +5 -4
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/projectRoot.d.ts +17 -0
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export * from './jsonLd';
|
|
|
5
5
|
export * from './defineEnv';
|
|
6
6
|
export * from './getEnv';
|
|
7
7
|
export * from './networking';
|
|
8
|
+
export * from './projectRoot';
|
|
8
9
|
export * from './registerClientScript';
|
|
9
10
|
export * from './streamingSlotMetricSink';
|
|
10
11
|
export * from './streamingSlots';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Absolute path to the project root — the directory holding your
|
|
3
|
+
* `absolute.config.*` (falling back to the nearest `package.json`, then
|
|
4
|
+
* `process.cwd()`). Resolved once at import.
|
|
5
|
+
*
|
|
6
|
+
* Anchor runtime and data paths to this instead of `import.meta.dir` /
|
|
7
|
+
* `import.meta.url`. Those resolve the *current module's* location, which is
|
|
8
|
+
* your `src/` tree under `absolute dev` but the bundled `dist/` under
|
|
9
|
+
* `absolute start` — so module-relative paths silently point somewhere else in
|
|
10
|
+
* production. `projectRoot` is identical in both modes because the CLI runs
|
|
11
|
+
* from the project root in both.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { projectRoot } from '@absolutejs/absolute';
|
|
15
|
+
* const dbPath = resolve(projectRoot, '.data', 'app.sqlite');
|
|
16
|
+
*/
|
|
17
|
+
export declare const projectRoot: string;
|
package/package.json
CHANGED