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

progressive-web-sdk

Package Overview
Dependencies
Maintainers
1
Versions
370
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

progressive-web-sdk

A set of libraries and components which make up the SDK for Progressive Web

  • 2.4.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by10%
Maintainers
1
Weekly downloads
 
Created
Source
 (                                                                              (    (         )
 )\ )                                                   (  (               )    )\ ) )\ )   ( /(
(()/( (         (  (  (      (         (    )      (    )\))(   '   (   ( /(   (()/((()/(   )\())
 /(_)))(    (   )\))( )(    ))\ (   (  )\  /((    ))\  ((_)()\ )   ))\  )\())   /(_))/(_))|((_)\
(_)) (()\   )\ ((_))\(()\  /((_))\  )\((_)(_))\  /((_) _(())\_)() /((_)((_)\   (_)) (_))_ |_ ((_)
| _ \ ((_) ((_) (()(_)((_)(_)) ((_)((_)(_)_)((_)(_))   \ \((_)/ /(_))  | |(_)  / __| |   \| |/ /
|  _/| '_|/ _ \/ _` || '_|/ -_)(_-<(_-<| |\ V / / -_)   \ \/\/ / / -_) | '_ \  \__ \ | |) | ' <
|_|  |_|  \___/\__, ||_|  \___|/__//__/|_| \_/  \___|    \_/\_/  \___| |_.__/  |___/ |___/ _|\_\
               |___/

NPM CircleCI

A set of components and utilities which make up the SDK for Progressive Web

You can find the latest version of the SDK Docs on DevCenter

Requirements

  • Git
  • We recommend you use nvm to manage node and npm versions.
  • Node ^10.17.0 or ^12.x
  • npm ^5.7.1 or ^6.11.3

Install Dependencies

npm i

Usage

The Progressive Web SDK has a number of components that can be used in progressive web builds. Component documentation and examples can be seen by running our styleguide:

npm run docs:dev

You can now view the styleguide at http://localhost:9000.

Our docs are built on styleguidist.

Use the SDK in a project

To use the progressive-web-sdk in a project, add it as a dev-dependency to your package.json. Once you have done that, run npm install.

Components can now be imported into your project by loading the build files from dist:

import Button from 'progressive-web-sdk/dist/components/button'

const myButton = <Button text="Take My Money!" />

If you are actively developing a new library or component in the SDK, run the following command in order for the files to be built into dist when making changes in src:

npm run dev:watch

Marking public API functions as experimental or deprecated

To mark a function as experimental or deprecated in code, you can use the utility functions experimental() or deprecate() from progressive-web-sdk/src/utils/warnings within your experimental/deprecated function. This will prompt a warning in the browser whenever your function is used. You can add an additional custom message to the warning by passing a string into the first parameter.

Example usage:

import {experimental} from './utils/warnings'

someExperimentalFunction() => {
  // regular usage
  experimental()

  // the function implementation
}

This is the warning that will print in your browser: [MOBIFY API WARNING]: You are currently using an experimental function: [someExperimentalFunction] This function may change at any time.

import {deprecate} from './utils/warnings'

someFunctionToBeDeprecated() => {
  // with custom message
  deprecate("It will be removed in version 1.2.3. Please use [newFunction] instead.")

  // the function implementation
}

This is the warning that will print in your browser: [MOBIFY API WARNING]: You are currently using an deprecated function: [someFunctionToBeDeprecated]. It will be removed in version 1.2.3. Please use [newFunction] instead.

Documentation

Please see the Documentation README.

FAQs

Package last updated on 03 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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