@fullstackunicorn/websites 1.0.5 → 1.0.7
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/index.dep.js +4 -4
- package/index.js +0 -1
- package/modules/images.js +5 -5
- package/package.json +3 -3
package/index.dep.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
// @FULLSTACKUNICORN
|
|
2
|
+
export { fsa } from '@fullstackunicorn/filesystem'
|
|
3
|
+
|
|
1
4
|
// NODE BUILT IN
|
|
2
5
|
export { default as path } from 'path'
|
|
3
6
|
|
|
4
|
-
//
|
|
5
|
-
export { fsa } from '@fullstackunicorn/filesystem'
|
|
6
|
-
|
|
7
|
-
// TOOLS
|
|
7
|
+
// PACKAGE
|
|
8
8
|
export * as blurhash from "blurhash"
|
|
9
9
|
export { default as sharp } from 'sharp'
|
package/index.js
CHANGED
package/modules/images.js
CHANGED
|
@@ -24,7 +24,7 @@ class Images {
|
|
|
24
24
|
return ext
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
getPicture = async ({ file,
|
|
27
|
+
getPicture = async ({ file, folder }) => {
|
|
28
28
|
|
|
29
29
|
const picture = {}
|
|
30
30
|
const pathParsed = path.parse(file.path)
|
|
@@ -35,7 +35,7 @@ class Images {
|
|
|
35
35
|
picture.ext = this.getExtension(pathParsed)
|
|
36
36
|
picture.base = sharp(file.buffer)
|
|
37
37
|
picture.name = pathParsed.name
|
|
38
|
-
picture.src = `${
|
|
38
|
+
picture.src = `${folder}/${picture.dir}TS/${picture.name}${picture.ext}`
|
|
39
39
|
|
|
40
40
|
picture.pathJson = `${picture.dir}${picture.name}.json`.replace(/^\/+/, '')
|
|
41
41
|
picture.pathImg = `${picture.dir}${picture.name}${picture.ext}`.replace(/^\/+/, '')
|
|
@@ -96,9 +96,9 @@ class Images {
|
|
|
96
96
|
return buffer
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
generate = async ({ file,
|
|
99
|
+
generate = async ({ file, folder }) => {
|
|
100
100
|
|
|
101
|
-
const picture = await this.getPicture({ file,
|
|
101
|
+
const picture = await this.getPicture({ file, folder })
|
|
102
102
|
const pictureData = await this.getPictureData({ picture })
|
|
103
103
|
|
|
104
104
|
const result = {}
|
|
@@ -134,7 +134,7 @@ class Images {
|
|
|
134
134
|
created.push(key)
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
F3.logs(
|
|
137
|
+
F3.logs(`✅ Created: ${created.join(' ')}\n`)
|
|
138
138
|
|
|
139
139
|
return result
|
|
140
140
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.7",
|
|
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",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"#@/*": "./*"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
32
|
+
"cmd": "chmod +x ./config.cmd.sh && ./config.cmd.sh",
|
|
33
|
+
"test": "exit 1"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@fullstackunicorn/filesystem": "^1.0.4",
|