Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-pwa

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-pwa - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

.travis.yml

5

package.json
{
"name": "create-pwa",
"version": "0.1.0",
"version": "0.2.0",
"description": "Easily create a progressive web app",
"scripts": {
"test": "node ./test/index.js"
"test": "tape test.js"
},

@@ -30,4 +30,5 @@ "bin": {

"sharp": "^0.20.2",
"tape": "^4.9.0",
"yargs": "^11.0.0"
}
}

13

README.md

@@ -6,2 +6,3 @@ [![GitHub stars](https://img.shields.io/github/stars/scriptex/create-pwa.svg?style=social&label=Stars)](https://github.com/scriptex/create-pwa)

[![GitHub last commit](https://img.shields.io/github/last-commit/scriptex/create-pwa.svg)](https://github.com/scriptex/create-pwa/commits/master)
[![Build Status](https://travis-ci.org/scriptex/create-pwa.svg?branch=master)](https://travis-ci.org/scriptex/create-pwa)
[![npm](https://img.shields.io/npm/dt/create-pwa.svg)](https://www.npmjs.com/package/create-pwa)

@@ -41,3 +42,7 @@ [![npm](https://img.shields.io/npm/v/create-pwa.svg)](https://www.npmjs.com/package/create-pwa)

```console
# Using NPM:
npm i -g create-pwa
# Using Yarn
yarn global add create-pwa
```

@@ -48,3 +53,3 @@

```console
npx create-pwa
npx create-pwa --icon="./icon.png"
```

@@ -54,3 +59,3 @@

`icon`: Specifies relative path to the application icon. This path is relative to the folder you are located in currently (`your/app/folder`).
`icon`: Specifies relative path to the application icon. This path is relative to the folder you are located in currently (`your/app/folder`). It is recommended that the icon file should be at least 512 pixels wide and 512 pixels high. **The `icon` argument is required.**

@@ -65,2 +70,6 @@ ## Usage

# If installed globally:
create-pwa --icon="./icon.png"
# Using NPX:
npx create-pwa --icon="./icon.png"

@@ -67,0 +76,0 @@ ```

@@ -25,8 +25,6 @@ /**

for (const size of iconSizes) {
const dimensions = size.split('x');
const width = Number(dimensions[0]);
const height = Number(dimensions[1]);
const [width, height] = size.split('x');
sharp(icon)
.resize(width, height)
.resize(Number(width), Number(height))
.png()

@@ -33,0 +31,0 @@ .toFile(`${folder}/icon-${size}.png`);

@@ -60,5 +60,8 @@ #!/usr/bin/env node

const setIcons = icon => {
const ext = icon.split('.').pop();
if (!icon) {
return;
}
const dir = resolve(pwd, 'icons');
const image = resolve(pwd, icon);
const dir = resolve(pwd, 'icons');

@@ -75,6 +78,6 @@ if (!existsSync(dir)) {

*/
const create = () => {
const create = ({ icon }) => {
const name = getAppName();
argv.icon && setIcons(argv.icon);
setIcons(argv.icon || icon);

@@ -85,6 +88,9 @@ setManifest(name);

create();
create({
icon: './icon.png'
});
module.exports = create;
module.exports.setIcons = setIcons;
module.exports.setManifest = setManifest;
module.exports.setServiceWorker = setServiceWorker;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc