0.0.127 ā€¢ Published 8 months ago

expo-pwa v0.0.127

Weekly downloads
86,541
License
MIT
Repository
github
Last release
8 months ago

šŸš€ Usage

You can use this package with npx or globally install:

# npx
npx expo-pwa [options]

# global
npm i -g expo-pwa

Optionally, you can install the sharp CLI globally before using this CLI for native image editing:

npm install -g sharp-cli

šŸ¤” Why?

This package was created as a universal solution for creating PWA assets locally, with optional native acceleration via Sharp CLI, falling back on Jimp for wider device compatibility. Internally the @expo/webpack-config uses this package to generate PWA compliant website for Expo projects. By splitting this logic out of the Webpack config, we can generate PWAs for Next.js and Gatsby projects as well!

Image generation is not limited to Expo projects.

Usage In Expo

You can use this CLI to generate PWA assets manually and skip the Expo Webpack PWA generation step, effectively speeding up your production builds.

To do this, you'll need to first eject the web/index.html

expo customize:web
# select the `web/index.html` option

Now you can run any of the PWA commands, for this example we'll generate favicons. Assuming you have an image at ./assets/icon.png, run the following command from the root project folder.

Note: This also works for remote images!

expo-pwa favicon ./assets/icon.png

The images by default will be created in the Expo web static folder web/ (this can be changed using the --output flag). You should see the following output:

$ expo-pwa favicon ./assets/icon.png

ā€ŗ Copy the following lines into your HTML <head/> to link the new assets.

<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png"></link>
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png"></link>
<link rel="shortcut icon" href="/favicon.ico"></link>

Simply copy the last few lines into the <head /> of your web/index.html. When you build your project with expo build:web, the new favicons will be copied over from the web/ folder, and Webpack will skip the Favicon generation step.

If you don't use all of the links, the Webpack config will attempt to create the missing ones using the values specified in your Expo project config.

You can always disable all PWA generation with expo build:web --no-pwa.

Commands

For more info run:

expo-pwa --help

# For command info, run `expo-pwa <command> --help`

expo-pwa splash --help
commanddescription
iconGenerate the home screen icons for a PWA
faviconGenerate the favicons for a website
splashGenerate the Safari splash screens for a PWA
manifestGenerate the PWA manifest from an Expo project config

License

The Expo source code is made available under the MIT license. Some of the dependencies are licensed differently, with the BSD license, for example.


0.0.127

8 months ago

0.0.126

10 months ago

0.0.125

11 months ago

0.0.124

1 year ago

0.0.120

2 years ago

0.0.123

2 years ago

0.0.122

2 years ago

0.0.121

2 years ago

0.0.117

2 years ago

0.0.116

2 years ago

0.0.115

2 years ago

0.0.119

2 years ago

0.0.118

2 years ago

0.0.114

2 years ago

0.0.106

2 years ago

0.0.105

2 years ago

0.0.109

2 years ago

0.0.108

2 years ago

0.0.107

2 years ago

0.0.113

2 years ago

0.0.112

2 years ago

0.0.111

2 years ago

0.0.110

2 years ago

0.0.104

2 years ago

0.0.103

2 years ago

0.0.102

2 years ago

0.0.101

2 years ago

0.0.98

3 years ago

0.0.99

2 years ago

0.0.97

3 years ago

0.0.95

3 years ago

0.0.94

3 years ago

0.0.93

3 years ago

0.0.92

3 years ago

0.0.91

3 years ago

0.0.89

3 years ago

0.0.90

3 years ago

0.0.88

3 years ago

0.0.87

3 years ago

0.0.84

3 years ago

0.0.85

3 years ago

0.0.86

3 years ago

0.0.80

3 years ago

0.0.81

3 years ago

0.0.82

3 years ago

0.0.83

3 years ago

0.0.79

3 years ago

0.0.73

3 years ago

0.0.74

3 years ago

0.0.75

3 years ago

0.0.76

3 years ago

0.0.77

3 years ago

0.0.78

3 years ago

0.0.72

3 years ago

0.0.71

3 years ago

0.0.70

3 years ago

0.0.68

3 years ago

0.0.69

3 years ago

0.0.67

3 years ago

0.0.67-alpha.0

3 years ago

0.0.66

3 years ago

0.0.65

3 years ago

0.0.65-alpha.0

3 years ago

0.0.64

3 years ago

0.0.63

3 years ago

0.0.62

3 years ago

0.0.60

3 years ago

0.0.61

3 years ago

0.0.60-alpha.0

3 years ago

0.0.59

3 years ago

0.0.59-alpha.0

3 years ago

0.0.58

3 years ago

0.0.57

3 years ago

0.0.56

3 years ago

0.0.55

3 years ago

0.0.54

3 years ago

0.0.53

3 years ago

0.0.52

3 years ago

0.0.51

3 years ago

0.0.50

3 years ago

0.0.49

3 years ago

0.0.48

3 years ago

0.0.47

3 years ago

0.0.46

3 years ago

0.0.45

4 years ago

0.0.44

4 years ago

0.0.43

4 years ago

0.0.42

4 years ago

0.0.41

4 years ago

0.0.40

4 years ago

0.0.39

4 years ago

0.0.38

4 years ago

0.0.37

4 years ago

0.0.36

4 years ago

0.0.35

4 years ago

0.0.34

4 years ago

0.0.33

4 years ago

0.0.32

4 years ago

0.0.31

4 years ago

0.0.30

4 years ago

0.0.29

4 years ago

0.0.28

4 years ago

0.0.27

4 years ago

0.0.26

4 years ago

0.0.25

4 years ago

0.0.24

4 years ago

0.0.23

4 years ago

0.0.22

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.15

4 years ago

0.0.16

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.12-alpha.0

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.1-alpha.6

4 years ago

0.0.1-alpha.5

4 years ago

0.0.1-alpha.4

4 years ago

0.0.1-alpha.2

4 years ago

0.0.1-alpha.3

4 years ago

0.0.1-alpha.1

4 years ago

0.0.1-alpha.0

4 years ago