@massimo-cassandro/create-favicons 1.5.0 → 1.5.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massimo-cassandro/create-favicons",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Favicon files builder",
5
5
  "bin": {
6
6
  "create-favicons": "./index.mjs"
@@ -14,11 +14,6 @@ import { printResult } from './print-result.mjs';
14
14
 
15
15
  export async function createFavicons(params) {
16
16
 
17
- if(params.snippet_language === 'ejs') {
18
- params.manifest_file_name = 'manifest.webmanifest.ejs';
19
- params.webmanifest_add_hash_to_files = false;
20
- }
21
-
22
17
  try {
23
18
 
24
19
  log('green', 'Creating favicons...');
@@ -54,7 +54,7 @@ export async function createSnippet(params) {
54
54
  } else {
55
55
 
56
56
  fs.promises.writeFile(
57
- `${params.snippet_path}/${params.snippet_language === 'ejs'? 'favicons.incl.ejs' : params.snippet_name}`,
57
+ `${params.snippet_path}/${params.snippet_name}`,
58
58
  snippet_content
59
59
  );
60
60
 
@@ -9,6 +9,18 @@ export function parseParams(config_params = null, work_dir = process.cwd()) {
9
9
  const params = {...default_params, ...(config_params??{})}
10
10
  params.work_dir = work_dir;
11
11
 
12
+ // ejs overrides
13
+ if(params.snippet_language === 'ejs') {
14
+ params.manifest_file_name = 'manifest.webmanifest.ejs';
15
+ params.webmanifest_add_hash_to_files = false;
16
+ params.create_snippet = true;
17
+ params.snippet_name = 'favicons.incl.ejs';
18
+ params.snippet_target_file = null;
19
+ params.snippet_path = params.output_dir;
20
+ params.add_cache_buster = false;
21
+
22
+
23
+ }
12
24
  [
13
25
  'src_img',
14
26
  'small_src_img',
@@ -39,6 +51,7 @@ export function parseParams(config_params = null, work_dir = process.cwd()) {
39
51
  }
40
52
 
41
53
 
54
+
42
55
  return params;
43
56
 
44
57
  } catch(e) {