@fullstackunicorn/websites 1.0.2 → 1.0.3
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/modules/images.js +6 -6
- package/package.json +1 -1
package/modules/images.js
CHANGED
|
@@ -25,20 +25,20 @@ class Images {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
getPicture = async ({ file, asset }) => {
|
|
28
|
+
|
|
28
29
|
const picture = {}
|
|
29
30
|
const pathParsed = path.parse(file.path)
|
|
30
|
-
if (!pathParsed.dir) F3.throw('no-picture-dir', file.path)
|
|
31
31
|
|
|
32
|
-
picture.dir = pathParsed.dir
|
|
32
|
+
picture.dir = pathParsed.dir ? `${pathParsed.dir}/` : ''
|
|
33
|
+
|
|
33
34
|
picture.original = pathParsed.base
|
|
34
35
|
picture.ext = this.getExtension(pathParsed)
|
|
35
36
|
picture.base = sharp(file.buffer)
|
|
36
37
|
picture.name = pathParsed.name
|
|
38
|
+
picture.src = `${asset}/${picture.dir}TS/${picture.name}${picture.ext}`
|
|
37
39
|
|
|
38
|
-
picture.
|
|
39
|
-
|
|
40
|
-
picture.pathJson = `${picture.dir}/${picture.name}.json`.replace(/^\/+/, '')
|
|
41
|
-
picture.pathImg = `${picture.dir}/${picture.name}${picture.ext}`.replace(/^\/+/, '')
|
|
40
|
+
picture.pathJson = `${picture.dir}${picture.name}.json`.replace(/^\/+/, '')
|
|
41
|
+
picture.pathImg = `${picture.dir}${picture.name}${picture.ext}`.replace(/^\/+/, '')
|
|
42
42
|
|
|
43
43
|
return picture
|
|
44
44
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.3",
|
|
3
3
|
"name": "@fullstackunicorn/websites",
|
|
4
4
|
"author": "lucanigido (https://fullstackunicorn.dev/author/lucanigido)",
|
|
5
5
|
"description": "A development utility for generating icons, favicons, thumbnails and all what is needed for websites",
|