@sphido/core 1.0.5 → 1.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/get-page.js +4 -4
- package/lib/get-pages.js +2 -2
- package/lib/index.js +1 -1
- package/package.json +3 -3
- package/readme.md +3 -3
package/lib/get-page.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import {promisify} from 'util';
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import {promisify} from 'node:util';
|
|
4
4
|
|
|
5
5
|
const readFile = promisify(fs.readFile);
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ export async function getPage(file, ...extenders) {
|
|
|
18
18
|
dir: path.relative('.', path.dirname(file)),
|
|
19
19
|
ext,
|
|
20
20
|
base: path.basename(file, ext),
|
|
21
|
-
content: await readFile(file, 'utf8')
|
|
21
|
+
content: await readFile(file, 'utf8'),
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
// Callbacks only
|
package/lib/get-pages.js
CHANGED
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphido/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Roman Ožana",
|
|
6
6
|
"email": "roman@ozana.cz",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"url": "git@github.com:sphido/sphido.git"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"ava": "^
|
|
36
|
+
"ava": "^4.0.1"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"test": "ava"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "92485b03992b3829ae1e26db0d43b6121c804d3f"
|
|
42
42
|
}
|
package/readme.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @sphido/core
|
|
2
2
|
|
|
3
|
-
Core contains most important [`getPage()`](https://github.com/sphido/sphido/blob/
|
|
4
|
-
and [`getPages()`](https://github.com/sphido/sphido/blob/
|
|
3
|
+
Core contains most important [`getPage()`](https://github.com/sphido/sphido/blob/main/packages/sphido-core/lib/get-page.js)
|
|
4
|
+
and [`getPages()`](https://github.com/sphido/sphido/blob/main/packages/sphido-core/lib/get-pages.js) functions.
|
|
5
5
|
|
|
6
6
|
* `getPage(file, [...extenders])` - returns a `page` object generated from file.
|
|
7
7
|
* `getPages(files, [...extenders])` - returns array of `page` objects from list of files.
|
|
@@ -50,4 +50,4 @@ import {getPage} from '@sphido/core';
|
|
|
50
50
|
|
|
51
51
|
## Source codes
|
|
52
52
|
|
|
53
|
-
https://github.com/sphido/sphido/tree/
|
|
53
|
+
https://github.com/sphido/sphido/tree/main/packages/sphido-core
|