Installations
npm install app-manifest-webpack-plugin
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=6.14.1
Node Version
13.14.0
NPM Version
6.14.8
Score
37.5
Supply Chain
53.7
Quality
64
Maintenance
25
Vulnerability
92.3
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
romanlex
Download Statistics
Total Downloads
306,888
Last Day
7
Last Week
42
Last Month
270
Last Year
15,248
GitHub Statistics
27 Stars
89 Commits
12 Forks
2 Watching
2 Branches
1 Contributors
Package Meta Information
Latest Version
1.2.2
Package Id
app-manifest-webpack-plugin@1.2.2
Unpacked Size
28.63 kB
Size
9.24 kB
File Count
8
NPM Version
6.14.8
Node Version
13.14.0
Total Downloads
Cumulative downloads
Total Downloads
306,888
Last day
-30%
7
Compared to previous day
Last week
-25%
42
Compared to previous week
Last month
-22.4%
270
Compared to previous month
Last year
-28.5%
15,248
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Peer Dependencies
1
Dev Dependencies
22
App Manifest Webpack Plugin
This is fork of jantimon/favicons-webpack-plugin with improvements:
- All tests is rewritten with support of webpack v4
- All dependencies is updated
- The plugin is rewritten in accordance with the principles of DRY
- Added support of webpack v4
- Added support of all params for config from
favicons
package
Allows to use the favicons generator with webpack.
This plugin also generates manifest files:
manifest.json
browserconfig.xml
yandex-browser-manifest.json
Screenshot with inject to HtmlWebpackPlugin
Installation
You must be running webpack (version ^2.x)
on node (version ^6.14.1)
Install:
1npm install --save-dev app-manifest-webpack-plugin
Install with yarn:
1yarn add -D app-manifest-webpack-plugin
Basic Usage
Add the plugin to your webpack config as follows:
1const AppManifestWebpackPlugin = require('app-manifest-webpack-plugin') 2 3... 4 5plugins: [ 6 new AppManifestWebpackPlugin({ 7 logo: 'my-logo.png', 8 inject: false, 9 }) 10]
This basic configuration will generate 37 different icons for iOS devices, Android devices and the Desktop browser out of your my-logo.png
file.
It can optionally also generate a iconstats.json
for you.
Usage with html-webpack-plugin
If you are using with html-webpack-plugin it will also inject the necessary html for you:
1 <link rel="apple-touch-icon" sizes="57x57" href="icons-366a3768de05f9e78c392fa62b8fbb80/apple-touch-icon-57x57.png"> 2 <link rel="apple-touch-icon" sizes="60x60" href="icons-366a3768de05f9e78c392fa62b8fbb80/apple-touch-icon-60x60.png"> 3 <link rel="apple-touch-icon" sizes="72x72" href="icons-366a3768de05f9e78c392fa62b8fbb80/apple-touch-icon-72x72.png"> 4 ... 5 ... 6 <link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" href="icons-366a3768de05f9e78c392fa62b8fbb80/apple-touch-startup-image-1536x2008.png">
1plugins: [ 2 new HtmlWebpackPlugin(), 3 // Make sure that AppManifestWebpackPlugin below HtmlWebpackPlugin 4 new AppManifestWebpackPlugin({ 5 logo: 'my-logo.png', 6 statsFilename: 'iconstats.json', 7 persistentCache: false, 8 config: { 9 path: '/static/assets/', 10 }, 11 }), 12]
All properties
1plugins: [ 2 new AppManifestWebpackPlugin({ 3 // Your source logo 4 logo: 'my-logo.png', 5 // Prefix for file names 6 prefix: '/assets/icons-[hash:8]/', // default '/' 7 // Output path for icons (icons will be saved to output.path(webpack config) + this key) 8 output: '/icons-[hash:8]/', // default '/'. Can be absolute or relative 9 // Emit all stats of the generated icons 10 emitStats: false, 11 // The name of the json containing all favicon information 12 statsFilename: 'iconstats.json', // can be absolute path 13 // Encode html entities in stats file (Example json_decode from php doesn't support html strings with escaped double quotes but it's valid json) 14 statsEncodeHtml: false, 15 // Generate a cache file with control hashes and 16 // don't rebuild the favicons until those hashes change 17 persistentCache: true, 18 // Inject the html into the html-webpack-plugin. Default true 19 inject: true, 20 // favicons configuration object. Support all keys of favicons (see https://github.com/haydenbleasel/favicons) 21 config: { 22 loadManifestWithCredentials: true, // use crossOrigin="use-credentials" for link tag with manifest 23 appName: 'Webpack App', // Your application's name. `string` 24 appDescription: null, // Your application's description. `string` 25 developerName: null, // Your (or your developer's) name. `string` 26 developerURL: null, // Your (or your developer's) URL. `string` 27 background: '#fff', // Background colour for flattened icons. `string` 28 theme_color: '#fff', // Theme color for browser chrome. `string` 29 display: 'standalone', // Android display: "browser" or "standalone". `string` 30 orientation: 'portrait', // Android orientation: "portrait" or "landscape". `string` 31 start_url: '/?homescreen=1', // Android start application's URL. `string` 32 version: '1.0', // Your application's version number. `number` 33 logging: false, // Print logs to console? `boolean` 34 icons: { 35 // Platform Options: 36 // - offset - offset in percentage 37 // - shadow - drop shadow for Android icons, available online only 38 // - background: 39 // * false - use default 40 // * true - force use default, e.g. set background for Android icons 41 // * color - set background for the specified icons 42 // 43 android: true, // Create Android homescreen icon. `boolean` or `{ offset, background, shadow }` 44 appleIcon: true, // Create Apple touch icons. `boolean` or `{ offset, background }` 45 appleStartup: true, // Create Apple startup images. `boolean` or `{ offset, background }` 46 coast: { offset: 25 }, // Create Opera Coast icon with offset 25%. `boolean` or `{ offset, background }` 47 favicons: true, // Create regular favicons. `boolean` 48 firefox: true, // Create Firefox OS icons. `boolean` or `{ offset, background }` 49 windows: true, // Create Windows 8 tile icons. `boolean` or `{ background }` 50 yandex: true, // Create Yandex browser icon. `boolean` or `{ background }` 51 }, 52 } 53 }) 54]
Prefix and output options
This options help you save output files or change paths to icons in your html as you want.
Example you want save output icons to icons/
directory in your build path but in html you want set another prefix for files, example /assets/webpack/icons/
when you can use options for this
1 new AppManifestWebpackPlugin({ 2 // Your source logo 3 logo: 'my-logo.png', 4 // Prefix for file names (html will be container icons with this prefix) 5 prefix: '/assets/webpack/', 6 // Output path for icons (icons will be saved to output.path(webpack config) + this key) 7 output: '/icons-[hash:8]/' 8 })
html file will be contains current paths
1<link rel="apple-touch-icon" sizes="120x120" href="/assets/webpack/icons-4b62aad7/apple-touch-icon-120x120.png"> 2<link rel="apple-touch-icon" sizes="144x144" href="/assets/webpack/icons-4b62aad7/apple-touch-icon-144x144.png"> 3<link rel="apple-touch-icon" sizes="152x152" href="/assets/webpack/icons-4b62aad7/apple-touch-icon-152x152.png"> 4<link rel="apple-touch-icon" sizes="180x180" href="/assets/webpack/icons-4b62aad7/apple-touch-icon-180x180.png">
but files will be saved to /icons-4b62aad7/
directory and you iconstats.json
contains correct outputFilePrefix
1{ "outputFilePrefix":"/assets/webpack/icons-4b62aad7/" }
Keep in mind what prefix
change filenames inside html, output
it is the path where icons wiil be saved
Or another case. You want save icons above the directory of webpack output
and want set corrent path in the manifest files and html files
1 new AppManifestWebpackPlugin({ 2 // Your source logo 3 logo: 'my-logo.png', 4 // Output path can be relative. Icons will be saved to webpack output directory + output 5 output: '../icons/', 6 // Change prefix of files for correct paths in your html and manifest files 7 prefix: '/icons/' 8 })
Stats file
When you use option emitStats
the plugin is generated stats file with statsFilename
and contains usefull data
1{ 2 "outputFilePrefix":"/", 3 "html": [], // array of html strings 4 "files": [], // array of generated icon names 5 "encodedHtml": "", // endoded html string if you use statsEncodeHtml option 6} 7
Changelog
Take a look at the CHANGELOG.md.
Contribution
You're free to contribute to this project by submitting issues and/or pull requests. This project is test-driven, so keep in mind that every change and new feature should be covered by tests. This project uses the semistandard code style.
License
This project is licensed under MIT.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 2/27 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 6 are checked with a SAST tool
Reason
85 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-p28h-cc7q-c4fg
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-pfq8-rq6v-vf5m
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-w7q9-p3jq-fmhm
- Warn: Project is vulnerable to: GHSA-xvf7-4v9q-58w6
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-46fh-8fc5-xcwx
- Warn: Project is vulnerable to: GHSA-h5mp-5q4p-ggf5
- Warn: Project is vulnerable to: GHSA-h726-x36v-rx45
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-x565-32qp-m3vf
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-h9rv-jmmf-4pgx
- Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp
- Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
- Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq
- Warn: Project is vulnerable to: GHSA-mpp5-2x55-49xw
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7
- Warn: Project is vulnerable to: GHSA-v4rh-8p82-6h5w
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
1.7
/10
Last Scanned on 2024-12-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to app-manifest-webpack-plugin
webapp-webpack-plugin
Let webpack generate your progressive web app icons for you
@talend/dynamic-cdn-webpack-plugin
Dynamically get your dependencies from a cdn rather than bundling them in your app
pwa-manifest-webpack-plugin
generating `manifest.json` for pwa app
@expo/webpack-pwa-manifest-plugin
Generates a progressive web app (PWA) manifest.json from a React Native app.json