@hestia-earth/guide 0.0.2 → 0.0.4
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/CHANGELOG.md +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -5
- package/package.json +1 -1
- /package/{content → dist/content}/hestia-101/content.json +0 -0
- /package/{content → dist/content}/hestia-101/content.md +0 -0
- /package/{content → dist/content}/index.json +0 -0
- /package/{content → dist/content}/models/content.json +0 -0
- /package/{content → dist/content}/models/content.md +0 -0
- /package/{content → dist/content}/models/contributing.json +0 -0
- /package/{content → dist/content}/models/contributing.md +0 -0
- /package/{content → dist/content}/models/documentation.json +0 -0
- /package/{content → dist/content}/models/documentation.md +0 -0
- /package/{content → dist/content}/models/faq.json +0 -0
- /package/{content → dist/content}/models/faq.md +0 -0
- /package/{content → dist/content}/models/introduction.json +0 -0
- /package/{content → dist/content}/models/introduction.md +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.0.4](https://gitlab.com/hestia-earth/hestia-guide/compare/v0.0.3...v0.0.4) (2024-10-29)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* load content from current directory ([4d03fad](https://gitlab.com/hestia-earth/hestia-guide/commit/4d03fade5b6782dd49752a0276e90ab69aea1d66))
|
|
11
|
+
|
|
12
|
+
### [0.0.3](https://gitlab.com/hestia-earth/hestia-guide/compare/v0.0.2...v0.0.3) (2024-10-29)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add `loadPages` method ([9c6c8df](https://gitlab.com/hestia-earth/hestia-guide/commit/9c6c8dfd5f10a2e8d09182b922974edf466e3294))
|
|
18
|
+
|
|
5
19
|
### [0.0.2](https://gitlab.com/hestia-earth/hestia-guide/compare/v0.0.1...v0.0.2) (2024-10-29)
|
|
6
20
|
|
|
7
21
|
### 0.0.1 (2024-10-29)
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export interface IGuideIndexPage {
|
|
|
15
15
|
pages?: guidePages;
|
|
16
16
|
}
|
|
17
17
|
export declare const loadIndex: () => IGuideIndexPage;
|
|
18
|
+
export declare const listPages: () => IGuideIndexPageContent[];
|
|
18
19
|
export declare const findPage: (id: string) => IGuideIndexPageContent;
|
|
19
20
|
export interface IGuidePageContent {
|
|
20
21
|
content: string;
|
package/dist/index.js
CHANGED
|
@@ -25,12 +25,13 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
25
25
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.loadPage = exports.findPage = exports.loadIndex = void 0;
|
|
29
|
-
var contentDir = "../content";
|
|
28
|
+
exports.loadPage = exports.findPage = exports.listPages = exports.loadIndex = void 0;
|
|
30
29
|
var loadIndex = function () {
|
|
31
|
-
return require("
|
|
30
|
+
return require("./content/index.json");
|
|
32
31
|
};
|
|
33
32
|
exports.loadIndex = loadIndex;
|
|
33
|
+
var listPages = function () { return flatPages((0, exports.loadIndex)()); };
|
|
34
|
+
exports.listPages = listPages;
|
|
34
35
|
var flatPages = function (_a) {
|
|
35
36
|
var content = _a.content, pages = _a.pages;
|
|
36
37
|
return __spreadArray([
|
|
@@ -38,11 +39,11 @@ var flatPages = function (_a) {
|
|
|
38
39
|
], __read(Object.values(pages || {}).flatMap(function (values) { return flatPages(values); })), false).filter(Boolean);
|
|
39
40
|
};
|
|
40
41
|
var findPage = function (id) {
|
|
41
|
-
return
|
|
42
|
+
return (0, exports.listPages)().find(function (page) { return page.id === id; });
|
|
42
43
|
};
|
|
43
44
|
exports.findPage = findPage;
|
|
44
45
|
var loadPage = function (_a) {
|
|
45
46
|
var jsonPath = _a.jsonPath;
|
|
46
|
-
return require("
|
|
47
|
+
return require("./content/".concat(jsonPath));
|
|
47
48
|
};
|
|
48
49
|
exports.loadPage = loadPage;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|