npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

apple-touch-icons-webpack-plugin

v1.2.0

Published

a webpack plugin for automatically creating apple touch icons and launch screens

Downloads

10

Readme

apple-touch-icons-webpack-plugin

A Webpack Plugin for automatically creating apple touch icons and launch screens

Installation

npm install --save-dev apple-touch-icons-webpack-plugin

Note: This plugin requires Webpack 4.0.0 and above.

Usage

Webpack Config

Update plugins array in webpack.config.js

//  all options
// *sizes is a list ie. [[h,w],[h,w],[h,w,]] 
// `*launch_screen_sizes` is a list ie. [[h,w],[h,w]] that is matched to the `launch_screen` option index
// `icon` and `launch_screen` are optional; defaults to see below, ie. if options are null 
// "apple-touch-icon.png", "launch_screen_portrait.png","launch_screen_landscape.png", "ipad.png" are expected to be somewhere in the path
// 'resize' can be fit, fill or crop (crop resizes then crops the image)
const AppleTouchIconsPlugin = require('apple-touch-icons-webpack-plugin')

options = {
    icon: "apple-touch-icon.png",
    launch_screen: ["launch-screen-portrait.png","launch-screen-landscape.png"],
    ipad: "ipad.png",
    icon_sizes: [[57, 57],[72, 72],[76, 76],[114, 114],[120, 120],[152, 152],[167, 167],[180, 180], [1024,1024]],
    launch_screen_sizes: [[481, 1024],[481, 1024]],
    ipad_sizes: [[568,320],[667,375],[736,414],[812,375],[1024,768],[834,834], [1024,1024] ],
    resize: "crop"
};

module.exports = {
plugins: [
new AppleTouchIconsPlugin(
    options,
)
]
}

//  minimum options
// "apple-touch-icon.png", "launch-screen-portrait.png","launch-screen-landscape.png","ipad.png" are expected to be somewhere in the path


module.exports = {
    plugins: [
        new AppleTouchIconsPlugin()
    ]
}

Html Config

<head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  <meta name="robots" content="noindex, nofollow">
  <meta name="viewport" content="width = device-width, initial-scale = 1.0, minimum-scale = 1, maximum-scale = 1, user-scalable = no">
  <meta name="apple-mobile-web-app-title" content="" />
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  <meta name="application-name" content="">
  <meta name="msapplication-starturl" content="">

  <link rel="apple-touch-icon" href="/path/to/apple-touch-icon.png" />
  <link rel="apple-touch-icon" sizes="57x57" href="/path/to/apple-touch-icon-57x57.png" />
  <link rel="apple-touch-icon" sizes="72x72" href="/path/to/apple-touch-icon-72x72.png"/>
  <link rel="apple-touch-icon" sizes="76x76" href="/path/to/apple-touch-icon-76x76.png" />
  <link rel="apple-touch-icon" sizes="114x114" href="/path/to/apple-touch-icon-114x114.png" />
  <link rel="apple-touch-icon" sizes="120x120" href="/path/to/apple-touch-icon-120x120.png" />
  <link rel="apple-touch-icon" sizes="144x144" href="/path/to/apple-touch-icon-144x144.png" />
  <link rel="apple-touch-icon" sizes="152x152" href="/path/to/apple-touch-icon-152x152.png" />
  <link rel="apple-touch-icon" sizes="167x167" href="/path/to/apple-touch-icon-167x167.png" />
  <link rel="apple-touch-icon" sizes="180x180" href="/path/to/apple-touch-icon-180x180.png" />
  <link rel="apple-touch-startup-image" href="/path/to/ipad-landscape-1024x481.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)" />
  <link rel="apple-touch-startup-image" href="/path/to/ipad-portrait-1024x481.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)" />
  <link rel="apple-touch-startup-image" href="/path/to/ipad-568x320.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
  <link rel="apple-touch-startup-image" href="/path/to/ipad-667x375.png" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
  <link rel="apple-touch-startup-image" href="/path/to/ipad-736x414.png" media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
  <link rel="apple-touch-startup-image" href="/path/to/ipad-812x375.png" media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
  <link rel="apple-touch-startup-image" href="/path/to/ipad-1024x768.png" media="(min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
  <link rel="apple-touch-startup-image" href="/path/to/ipad-834x834.png" media="(min-device-width: 834px) and (max-device-width: 834px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
  <link rel="apple-touch-startup-image" href="/path/to/ipad-1024x1024.png" media="(min-device-width: 1024px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
  <meta name="author" content="@">
    <title>Example Title</title>
</head>