@sphido/core 2.0.8 → 2.0.9
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/lib/all-pages.js +3 -0
- package/lib/copy-file.js +2 -2
- package/lib/get-pages.js +3 -3
- package/lib/is-page.js +0 -1
- package/package.json +2 -2
package/lib/all-pages.js
CHANGED
package/lib/copy-file.js
CHANGED
|
@@ -5,8 +5,8 @@ import {dirname} from 'node:path';
|
|
|
5
5
|
/**
|
|
6
6
|
* Write content to the file and create directory if not exists
|
|
7
7
|
*
|
|
8
|
-
* @param {string}
|
|
9
|
-
* @param {string}
|
|
8
|
+
* @param {string} src
|
|
9
|
+
* @param {string} dest
|
|
10
10
|
* @returns {Promise<*>}
|
|
11
11
|
*/
|
|
12
12
|
export async function copyFile(src, dest) {
|
package/lib/get-pages.js
CHANGED
|
@@ -5,9 +5,9 @@ import {isPage} from './is-page.js';
|
|
|
5
5
|
/**
|
|
6
6
|
* Retrieve an array tree of pages from path
|
|
7
7
|
* @param {string} path
|
|
8
|
-
* @param {
|
|
9
|
-
* @param extenders
|
|
10
|
-
* @returns {Promise<Awaited<unknown>[{name, path}]>}
|
|
8
|
+
* @param {function(dirent:Dirent, path:string)} include
|
|
9
|
+
* @param {Object|function(page:{name:string, path:string}, dirent:Dirent, path:string)} extenders
|
|
10
|
+
* @returns {Promise<Awaited<unknown>[{name:string, path:string}]>}
|
|
11
11
|
*/
|
|
12
12
|
export async function getPages({path = 'content', include = isPage} = {}, ...extenders) {
|
|
13
13
|
const dir = await readdir(path, {withFileTypes: true});
|
package/lib/is-page.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphido/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Roman Ožana",
|
|
6
6
|
"email": "roman@ozana.cz",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"no-await-in-loop": 0
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "5ede811c6442f334f5dd04f0d146b49fc7a785ad"
|
|
49
49
|
}
|