@vitus-labs/tools-favicon 0.26.0 → 0.28.0-alpha.1
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/analysis/vitus-tools-favicon.js.html +1 -1
- package/lib/analysis/vitus-tools-favicon.module.js.html +1 -1
- package/lib/vitus-tools-favicon.js +3 -2
- package/lib/vitus-tools-favicon.js.map +1 -1
- package/lib/vitus-tools-favicon.module.js +4 -3
- package/lib/vitus-tools-favicon.module.js.map +1 -1
- package/package.json +6 -7
|
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
|
|
|
6424
6424
|
</script>
|
|
6425
6425
|
<script>
|
|
6426
6426
|
/*<!--*/
|
|
6427
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-tools-favicon.js","children":[{"name":"src","children":[{"uid":"
|
|
6427
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-tools-favicon.js","children":[{"name":"src","children":[{"uid":"a65e-1","name":"baseConfig.ts"},{"uid":"a65e-3","name":"generateFavicon.ts"},{"uid":"a65e-5","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"a65e-1":{"renderedLength":1327,"gzipLength":559,"brotliLength":0,"mainUid":"a65e-0"},"a65e-3":{"renderedLength":1038,"gzipLength":456,"brotliLength":0,"mainUid":"a65e-2"},"a65e-5":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"a65e-4"}},"nodeMetas":{"a65e-0":{"id":"/src/baseConfig.ts","moduleParts":{"vitus-tools-favicon.js":"a65e-1"},"imported":[],"importedBy":[{"uid":"a65e-4"},{"uid":"a65e-2"}]},"a65e-2":{"id":"/src/generateFavicon.ts","moduleParts":{"vitus-tools-favicon.js":"a65e-3"},"imported":[{"uid":"a65e-6"},{"uid":"a65e-7"},{"uid":"a65e-8"},{"uid":"a65e-0"}],"importedBy":[{"uid":"a65e-4"}]},"a65e-4":{"id":"/src/index.ts","moduleParts":{"vitus-tools-favicon.js":"a65e-5"},"imported":[{"uid":"a65e-2"},{"uid":"a65e-0"}],"importedBy":[],"isEntry":true},"a65e-6":{"id":"fs","moduleParts":{},"imported":[],"importedBy":[{"uid":"a65e-2"}],"isExternal":true},"a65e-7":{"id":"favicons","moduleParts":{},"imported":[],"importedBy":[{"uid":"a65e-2"}],"isExternal":true},"a65e-8":{"id":"@vitus-labs/tools-core","moduleParts":{},"imported":[],"importedBy":[{"uid":"a65e-2"}],"isExternal":true}},"env":{"rollup":"2.70.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
6428
6428
|
|
|
6429
6429
|
const run = () => {
|
|
6430
6430
|
const width = window.innerWidth;
|
|
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
|
|
|
6424
6424
|
</script>
|
|
6425
6425
|
<script>
|
|
6426
6426
|
/*<!--*/
|
|
6427
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-tools-favicon.module.js","children":[{"name":"src","children":[{"uid":"
|
|
6427
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-tools-favicon.module.js","children":[{"name":"src","children":[{"uid":"a65e-10","name":"baseConfig.ts"},{"uid":"a65e-12","name":"generateFavicon.ts"},{"uid":"a65e-14","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"a65e-10":{"renderedLength":1327,"gzipLength":559,"brotliLength":0,"mainUid":"a65e-9"},"a65e-12":{"renderedLength":968,"gzipLength":435,"brotliLength":0,"mainUid":"a65e-11"},"a65e-14":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"a65e-13"}},"nodeMetas":{"a65e-9":{"id":"/src/baseConfig.ts","moduleParts":{"vitus-tools-favicon.module.js":"a65e-10"},"imported":[],"importedBy":[{"uid":"a65e-13"},{"uid":"a65e-11"}]},"a65e-11":{"id":"/src/generateFavicon.ts","moduleParts":{"vitus-tools-favicon.module.js":"a65e-12"},"imported":[{"uid":"a65e-15"},{"uid":"a65e-16"},{"uid":"a65e-17"},{"uid":"a65e-9"}],"importedBy":[{"uid":"a65e-13"}]},"a65e-13":{"id":"/src/index.ts","moduleParts":{"vitus-tools-favicon.module.js":"a65e-14"},"imported":[{"uid":"a65e-11"},{"uid":"a65e-9"}],"importedBy":[],"isEntry":true},"a65e-15":{"id":"fs","moduleParts":{},"imported":[],"importedBy":[{"uid":"a65e-11"}],"isExternal":true},"a65e-16":{"id":"favicons","moduleParts":{},"imported":[],"importedBy":[{"uid":"a65e-11"}],"isExternal":true},"a65e-17":{"id":"@vitus-labs/tools-core","moduleParts":{},"imported":[],"importedBy":[{"uid":"a65e-11"}],"isExternal":true}},"env":{"rollup":"2.70.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
6428
6428
|
|
|
6429
6429
|
const run = () => {
|
|
6430
6430
|
const width = window.innerWidth;
|
|
@@ -47,7 +47,8 @@ const configuration = {
|
|
|
47
47
|
},
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
const
|
|
50
|
+
const VL_CONFIG = toolsCore.loadVLToolsConfig('favicon');
|
|
51
|
+
const { icons, path, ...restConfig } = VL_CONFIG.merge(configuration);
|
|
51
52
|
const callback = (outputPath) => (error, response) => {
|
|
52
53
|
if (error) {
|
|
53
54
|
console.log(error.message); // Error description e.g. "An unknown error has occurred"
|
|
@@ -66,7 +67,7 @@ const generateFavicons = () => icons.forEach((item) => {
|
|
|
66
67
|
const inputPath = `${process.cwd()}/${item.input}`;
|
|
67
68
|
const outputPath = `${process.cwd()}/${item.output}/`;
|
|
68
69
|
// favicons(source, configuration, callback)
|
|
69
|
-
favicons__default["default"](inputPath, { ...
|
|
70
|
+
favicons__default["default"](inputPath, { ...restConfig, path: `${path}/${item.path}` }, callback(outputPath));
|
|
70
71
|
});
|
|
71
72
|
|
|
72
73
|
exports.configuration = configuration;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitus-tools-favicon.js","sources":["../src/baseConfig.ts","../src/generateFavicon.ts"],"sourcesContent":["const configuration = {\n dir: 'auto', // Primary text direction for name, short_name, and description\n lang: 'en-US', // Primary language for name and short_name\n background: '#fff', // Background colour for flattened icons. `string`\n theme_color: '#fff', // Theme color user for example in Android's task switcher. `string`\n appleStatusBarStyle: 'black-translucent', // Style for Apple status bar: \"black-translucent\", \"default\", \"black\". `string`\n display: 'standalone', // Preferred display mode: \"fullscreen\", \"standalone\", \"minimal-ui\" or \"browser\". `string`\n orientation: 'any', // Default orientation: \"any\", \"natural\", \"portrait\" or \"landscape\". `string`\n scope: '/', // set of URLs that the browser considers within your app\n start_url: '/?homescreen=1', // Start URL when launching the application from a device. `string`\n version: '1.0', // Your application's version string. `string`\n logging: false, // Print logs to console? `boolean`\n pixel_art: false, // Keeps pixels \"sharp\" when scaling up, for pixel art. Only supported in offline mode.\n loadManifestWithCredentials: false, // Browsers don't send cookies when fetching a manifest, enable this to fix that. `boolean`\n icons: {\n // Platform Options:\n // - offset - offset in percentage\n // - background:\n // * false - use default\n // * true - force use default, e.g. set background for Android icons\n // * color - set background for the specified icons\n // * mask - apply mask in order to create circle icon (applied by default for firefox). `boolean`\n // * overlayGlow - apply glow effect after mask has been applied (applied by default for firefox). `boolean`\n // * overlayShadow - apply drop shadow after mask has been applied .`boolean`\n //\n android: true, // Create Android homescreen icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n appleIcon: true, // Create Apple touch icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n appleStartup: true, // Create Apple startup images. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n coast: true, // Create Opera Coast icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n favicons: true, // Create regular favicons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n firefox: true, // Create Firefox OS icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n windows: true, // Create Windows 8 tile icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n yandex: true, // Create Yandex browser icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n },\n}\n\nexport type Configuration = typeof configuration\n\nexport default configuration\n","import fs from 'fs'\nimport favicons from 'favicons'\nimport {
|
|
1
|
+
{"version":3,"file":"vitus-tools-favicon.js","sources":["../src/baseConfig.ts","../src/generateFavicon.ts"],"sourcesContent":["const configuration = {\n dir: 'auto', // Primary text direction for name, short_name, and description\n lang: 'en-US', // Primary language for name and short_name\n background: '#fff', // Background colour for flattened icons. `string`\n theme_color: '#fff', // Theme color user for example in Android's task switcher. `string`\n appleStatusBarStyle: 'black-translucent', // Style for Apple status bar: \"black-translucent\", \"default\", \"black\". `string`\n display: 'standalone', // Preferred display mode: \"fullscreen\", \"standalone\", \"minimal-ui\" or \"browser\". `string`\n orientation: 'any', // Default orientation: \"any\", \"natural\", \"portrait\" or \"landscape\". `string`\n scope: '/', // set of URLs that the browser considers within your app\n start_url: '/?homescreen=1', // Start URL when launching the application from a device. `string`\n version: '1.0', // Your application's version string. `string`\n logging: false, // Print logs to console? `boolean`\n pixel_art: false, // Keeps pixels \"sharp\" when scaling up, for pixel art. Only supported in offline mode.\n loadManifestWithCredentials: false, // Browsers don't send cookies when fetching a manifest, enable this to fix that. `boolean`\n icons: {\n // Platform Options:\n // - offset - offset in percentage\n // - background:\n // * false - use default\n // * true - force use default, e.g. set background for Android icons\n // * color - set background for the specified icons\n // * mask - apply mask in order to create circle icon (applied by default for firefox). `boolean`\n // * overlayGlow - apply glow effect after mask has been applied (applied by default for firefox). `boolean`\n // * overlayShadow - apply drop shadow after mask has been applied .`boolean`\n //\n android: true, // Create Android homescreen icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n appleIcon: true, // Create Apple touch icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n appleStartup: true, // Create Apple startup images. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n coast: true, // Create Opera Coast icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n favicons: true, // Create regular favicons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n firefox: true, // Create Firefox OS icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n windows: true, // Create Windows 8 tile icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n yandex: true, // Create Yandex browser icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n },\n}\n\nexport type Configuration = typeof configuration\n\nexport default configuration\n","import fs from 'fs'\nimport favicons from 'favicons'\nimport { loadVLToolsConfig } from '@vitus-labs/tools-core'\nimport baseConfig from '~/baseConfig'\n\nconst VL_CONFIG = loadVLToolsConfig('favicon')\n\nconst { icons, path, ...restConfig } = VL_CONFIG.merge(baseConfig)\n\nconst callback = (outputPath) => (error, response) => {\n if (error) {\n console.log(error.message) // Error description e.g. \"An unknown error has occurred\"\n return\n }\n\n console.log('Creating images...')\n response.images.forEach((item) => {\n fs.writeFileSync(`${outputPath}${item.name}`, item.contents)\n })\n\n console.log('Creating manifests...')\n response.files.forEach((item) => {\n fs.writeFileSync(`${outputPath}${item.name}`, item.contents)\n })\n}\n\nconst generateFavicons = () =>\n icons.forEach((item) => {\n const inputPath = `${process.cwd()}/${item.input}`\n const outputPath = `${process.cwd()}/${item.output}/`\n\n // favicons(source, configuration, callback)\n favicons(\n inputPath,\n { ...restConfig, path: `${path}/${item.path}` },\n callback(outputPath)\n )\n })\n\nexport default generateFavicons\n"],"names":["loadVLToolsConfig","baseConfig","fs","favicons"],"mappings":";;;;;;;;;;;;;AAAA,MAAM,aAAa,GAAG;AACpB,IAAA,GAAG,EAAE,MAAM;AACX,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,WAAW,EAAE,MAAM;AACnB,IAAA,mBAAmB,EAAE,mBAAmB;A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AAC,OAAO,CAAC,CAAC,IAAI,KAAI;AAC9B,QAAAA,sBAAE,CAAC,aAAa,CAAC,CAAA,EAAG,UAAU,CAAG,EAAA,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;AAC9D,KAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,MACvB,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AACrB,IAAA,MAAM,SAAS,GAAG,CAAG,EAAA,OAAO,CAAC,GAAG,EAAE,CAAA,CAAA,EAAI,IAAI,CAAC,KAAK,CAAA,CAAE,CAAA;AAClD,IAAA,MAAM,UAAU,GAAG,CAAG,EAAA,OAAO,CAAC,GAAG,EAAE,CAAA,CAAA,EAAI,IAAI,CAAC,MAAM,CAAA,CAAA,CAAG,CAAA;;IAGrDC,4BAAQ,CACN,SAAS,EACT,EAAE,GAAG,UAAU,EAAE,IAAI,EAAE,CAAG,EAAA,IAAI,IAAI,IAAI,CAAC,IAAI,CAAA,CAAE,EAAE,EAC/C,QAAQ,CAAC,UAAU,CAAC,CACrB,CAAA;AACH,CAAC;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import favicons from 'favicons';
|
|
3
|
-
import {
|
|
3
|
+
import { loadVLToolsConfig } from '@vitus-labs/tools-core';
|
|
4
4
|
|
|
5
5
|
const configuration = {
|
|
6
6
|
dir: 'auto',
|
|
@@ -38,7 +38,8 @@ const configuration = {
|
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
const
|
|
41
|
+
const VL_CONFIG = loadVLToolsConfig('favicon');
|
|
42
|
+
const { icons, path, ...restConfig } = VL_CONFIG.merge(configuration);
|
|
42
43
|
const callback = (outputPath) => (error, response) => {
|
|
43
44
|
if (error) {
|
|
44
45
|
console.log(error.message); // Error description e.g. "An unknown error has occurred"
|
|
@@ -57,7 +58,7 @@ const generateFavicons = () => icons.forEach((item) => {
|
|
|
57
58
|
const inputPath = `${process.cwd()}/${item.input}`;
|
|
58
59
|
const outputPath = `${process.cwd()}/${item.output}/`;
|
|
59
60
|
// favicons(source, configuration, callback)
|
|
60
|
-
favicons(inputPath, { ...
|
|
61
|
+
favicons(inputPath, { ...restConfig, path: `${path}/${item.path}` }, callback(outputPath));
|
|
61
62
|
});
|
|
62
63
|
|
|
63
64
|
export { configuration, generateFavicons };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitus-tools-favicon.module.js","sources":["../src/baseConfig.ts","../src/generateFavicon.ts"],"sourcesContent":["const configuration = {\n dir: 'auto', // Primary text direction for name, short_name, and description\n lang: 'en-US', // Primary language for name and short_name\n background: '#fff', // Background colour for flattened icons. `string`\n theme_color: '#fff', // Theme color user for example in Android's task switcher. `string`\n appleStatusBarStyle: 'black-translucent', // Style for Apple status bar: \"black-translucent\", \"default\", \"black\". `string`\n display: 'standalone', // Preferred display mode: \"fullscreen\", \"standalone\", \"minimal-ui\" or \"browser\". `string`\n orientation: 'any', // Default orientation: \"any\", \"natural\", \"portrait\" or \"landscape\". `string`\n scope: '/', // set of URLs that the browser considers within your app\n start_url: '/?homescreen=1', // Start URL when launching the application from a device. `string`\n version: '1.0', // Your application's version string. `string`\n logging: false, // Print logs to console? `boolean`\n pixel_art: false, // Keeps pixels \"sharp\" when scaling up, for pixel art. Only supported in offline mode.\n loadManifestWithCredentials: false, // Browsers don't send cookies when fetching a manifest, enable this to fix that. `boolean`\n icons: {\n // Platform Options:\n // - offset - offset in percentage\n // - background:\n // * false - use default\n // * true - force use default, e.g. set background for Android icons\n // * color - set background for the specified icons\n // * mask - apply mask in order to create circle icon (applied by default for firefox). `boolean`\n // * overlayGlow - apply glow effect after mask has been applied (applied by default for firefox). `boolean`\n // * overlayShadow - apply drop shadow after mask has been applied .`boolean`\n //\n android: true, // Create Android homescreen icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n appleIcon: true, // Create Apple touch icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n appleStartup: true, // Create Apple startup images. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n coast: true, // Create Opera Coast icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n favicons: true, // Create regular favicons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n firefox: true, // Create Firefox OS icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n windows: true, // Create Windows 8 tile icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n yandex: true, // Create Yandex browser icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n },\n}\n\nexport type Configuration = typeof configuration\n\nexport default configuration\n","import fs from 'fs'\nimport favicons from 'favicons'\nimport {
|
|
1
|
+
{"version":3,"file":"vitus-tools-favicon.module.js","sources":["../src/baseConfig.ts","../src/generateFavicon.ts"],"sourcesContent":["const configuration = {\n dir: 'auto', // Primary text direction for name, short_name, and description\n lang: 'en-US', // Primary language for name and short_name\n background: '#fff', // Background colour for flattened icons. `string`\n theme_color: '#fff', // Theme color user for example in Android's task switcher. `string`\n appleStatusBarStyle: 'black-translucent', // Style for Apple status bar: \"black-translucent\", \"default\", \"black\". `string`\n display: 'standalone', // Preferred display mode: \"fullscreen\", \"standalone\", \"minimal-ui\" or \"browser\". `string`\n orientation: 'any', // Default orientation: \"any\", \"natural\", \"portrait\" or \"landscape\". `string`\n scope: '/', // set of URLs that the browser considers within your app\n start_url: '/?homescreen=1', // Start URL when launching the application from a device. `string`\n version: '1.0', // Your application's version string. `string`\n logging: false, // Print logs to console? `boolean`\n pixel_art: false, // Keeps pixels \"sharp\" when scaling up, for pixel art. Only supported in offline mode.\n loadManifestWithCredentials: false, // Browsers don't send cookies when fetching a manifest, enable this to fix that. `boolean`\n icons: {\n // Platform Options:\n // - offset - offset in percentage\n // - background:\n // * false - use default\n // * true - force use default, e.g. set background for Android icons\n // * color - set background for the specified icons\n // * mask - apply mask in order to create circle icon (applied by default for firefox). `boolean`\n // * overlayGlow - apply glow effect after mask has been applied (applied by default for firefox). `boolean`\n // * overlayShadow - apply drop shadow after mask has been applied .`boolean`\n //\n android: true, // Create Android homescreen icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n appleIcon: true, // Create Apple touch icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n appleStartup: true, // Create Apple startup images. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n coast: true, // Create Opera Coast icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n favicons: true, // Create regular favicons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n firefox: true, // Create Firefox OS icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n windows: true, // Create Windows 8 tile icons. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n yandex: true, // Create Yandex browser icon. `boolean` or `{ offset, background, mask, overlayGlow, overlayShadow }` or an array of sources\n },\n}\n\nexport type Configuration = typeof configuration\n\nexport default configuration\n","import fs from 'fs'\nimport favicons from 'favicons'\nimport { loadVLToolsConfig } from '@vitus-labs/tools-core'\nimport baseConfig from '~/baseConfig'\n\nconst VL_CONFIG = loadVLToolsConfig('favicon')\n\nconst { icons, path, ...restConfig } = VL_CONFIG.merge(baseConfig)\n\nconst callback = (outputPath) => (error, response) => {\n if (error) {\n console.log(error.message) // Error description e.g. \"An unknown error has occurred\"\n return\n }\n\n console.log('Creating images...')\n response.images.forEach((item) => {\n fs.writeFileSync(`${outputPath}${item.name}`, item.contents)\n })\n\n console.log('Creating manifests...')\n response.files.forEach((item) => {\n fs.writeFileSync(`${outputPath}${item.name}`, item.contents)\n })\n}\n\nconst generateFavicons = () =>\n icons.forEach((item) => {\n const inputPath = `${process.cwd()}/${item.input}`\n const outputPath = `${process.cwd()}/${item.output}/`\n\n // favicons(source, configuration, callback)\n favicons(\n inputPath,\n { ...restConfig, path: `${path}/${item.path}` },\n callback(outputPath)\n )\n })\n\nexport default generateFavicons\n"],"names":["baseConfig"],"mappings":";;;;AAAA,MAAM,aAAa,GAAG;AACpB,IAAA,GAAG,EAAE,MAAM;AACX,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,WAAW,EAAE,MAAM;AACnB,IAAA,mBAAmB,EAAE,mBAAmB;AACxC,IAAA,OAAO,EAAE,YAAY;AACrB,IAAA,WAAW,EAAE,KAAK;AAClB,IAAA,KAAK,EAAE,GAAG;AACV,IAAA,SAAS,EAAE,gBAAgB;AAC3B,IAAA,OAAO,EAAE,KAAK;AACd,IAAA,OAAO,EAAE,KAAK;AACd,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,2BAA2B,EAAE,KAAK;AAClC,IAAA,KAAK,EAAE;;;;;;;;;;;AAWL,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,SAAS,EAAE,IAAI;AACf,QAAA,YAAY,EAAE,IAAI;AAClB,QAAA,KAAK,EAAE,IAAI;AACX,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;AACb,KAAA;;;AC5BH,MAAM,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAA;AAE9C,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,GAAG,SAAS,CAAC,KAAK,CAACA,aAAU,CAAC,CAAA;AAElE,MAAM,QAAQ,GAAG,CAAC,UAAU,KAAK,CAAC,KAAK,EAAE,QAAQ,KAAI;AACnD,IAAA,IAAI,KAAK,EAAE;QACT,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAC1B,OAAM;AACP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|
"license": "MIT",
|
|
5
5
|
"author": "Vit Bokisch <vit@bokisch.com>",
|
|
6
6
|
"maintainers": [
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"vl_favicon": "bin/run-favicon.js"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"dev": "yarn vl_stories",
|
|
21
20
|
"prepublish": "yarn build",
|
|
22
21
|
"build": "yarn vl_build",
|
|
23
22
|
"build:watch": "yarn vl_build-watch",
|
|
@@ -29,11 +28,11 @@
|
|
|
29
28
|
"access": "public"
|
|
30
29
|
},
|
|
31
30
|
"dependencies": {
|
|
32
|
-
"@vitus-labs/tools-babel": "0.
|
|
33
|
-
"@vitus-labs/tools-core": "0.
|
|
34
|
-
"@vitus-labs/tools-rollup": "0.
|
|
35
|
-
"@vitus-labs/tools-typescript": "0.
|
|
31
|
+
"@vitus-labs/tools-babel": "0.28.0-alpha.1",
|
|
32
|
+
"@vitus-labs/tools-core": "0.28.0-alpha.1",
|
|
33
|
+
"@vitus-labs/tools-rollup": "0.28.0-alpha.1",
|
|
34
|
+
"@vitus-labs/tools-typescript": "0.28.0-alpha.1",
|
|
36
35
|
"favicons": "^6.2.2"
|
|
37
36
|
},
|
|
38
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "a0670cd48d28486f01ebfa7adb2afcf13041d531"
|
|
39
38
|
}
|