Skip to content

Commit

Permalink
add settings for icons generated
Browse files Browse the repository at this point in the history
  • Loading branch information
ipatate committed Feb 11, 2023
1 parent 6d55a88 commit 2727ae0
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 8 deletions.
2 changes: 2 additions & 0 deletions admin/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import getThemeDir from '../inc/js-helpers/getThemeDir.js'
const viteAdminConfig = {
...viteConfig,
...{
publicDir: false,
cacheDir: './node_modules/.vite/press-wind-admin',
// add react for use jsx and extends gutenberg blocks :)
plugins: [...viteConfig.plugins, react()],
base:
Expand Down
14 changes: 14 additions & 0 deletions config/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
// 'background' => '#fff',
// 'theme_color' => 'rgb(190, 24, 93)',
// 'lang' => 'fr-FR',
// see settings https://www.npmjs.com/package/favicons#usage
// 'preferRelatedApplications' => false,
// 'pixel_art' => false,
// 'loadManifestWithCredentials' => false,
// 'manifestMaskable' => false,
// 'icons' => [
// 'favicons' => true,
// 'android' => true,
// 'appleIcon' => true,
// 'appleStartup' => false,
// 'coast' => false,
// 'yandex' => false,
// 'windows' => false,
// ],
// ],
// 'disable' => [
// // disable rss links
Expand Down
13 changes: 13 additions & 0 deletions inc/core/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@
'background' => '#fff',
'theme_color' => 'rgb(190, 24, 93)',
'lang' => 'fr-FR',
'preferRelatedApplications' => false,
'pixel_art' => false,
'loadManifestWithCredentials' => false,
'manifestMaskable' => false,
'icons' => [
'favicons' => true,
'android' => true,
'appleIcon' => true,
'appleStartup' => false,
'coast' => false,
'yandex' => false,
'windows' => false,
],
],
'disable' => [
// disable rss links
Expand Down
18 changes: 11 additions & 7 deletions inc/core/faviconGenerator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ const configuration = {
orientation: 'any', // Default orientation: "any", "natural", "portrait" or "landscape". `string`
// scope: '/',
start_url: '/',
preferRelatedApplications: false,
pixel_art: false,
loadManifestWithCredentials: false,
manifestMaskable: false,
preferRelatedApplications: config.manifest.preferRelatedApplications,
pixel_art: config.manifest.pixel_art,
loadManifestWithCredentials: config.manifest.loadManifestWithCredentials,
manifestMaskable: config.manifest.manifestMaskable,
icons: {
coast: false,
yandex: false,
windows: false,
favicons: config.manifest.icons.favicons,
android: config.manifest.icons.android,
appleIcon: config.manifest.icons.appleIcon,
appleStartup: config.manifest.icons.appleStartup,
coast: config.manifest.icons.coast,
yandex: config.manifest.icons.yandex,
windows: config.manifest.icons.windows,
},
shortcuts: [],
output: {
Expand Down
3 changes: 2 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import getThemeDir from './inc/js-helpers/getThemeDir.js'

// https://vitejs.dev/config/
export const viteConfig = {
cacheDir: './node_modules/.vite/press-wind',
plugins: [
liveReload([
__dirname + '/**/*.php',
// __dirname + '/**/*.twig'
]),
legacy({
// target is default
// targets: ['defaults', 'ie >= 11'],
targets: ['defaults', 'ie >= 11'],
additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
polyfills: [],
modernPolyfills: [],
Expand Down

0 comments on commit 2727ae0

Please sign in to comment.