Giter Site home page Giter Site logo

easywebapp / web-polyfill Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 2.78 MB

An automatic CDN service for Web polyfills, which is based on TypeScript, Node.js & JSDelivr.

Home Page: https://polyfill.web-cell.dev/

TypeScript 100.00%
web polyfill cdn service javascript typescript nodejs package jsdelivr

web-polyfill's Introduction

Web polyfill

An automatic CDN service for Web polyfills, which is based on TypeScript, Node.js & JSDelivr.

CI & CD

Usage example

  1. Find a Web feature in the Polyfill directory
  2. Copy the class name of the selected polyfill, then write it into a specific Script URL (shown below)
  3. the above script will detect whether current environment needs to be patched, then load the polyfill script original from JSDelivr

Web pages

<head>
    <script src="https://polyfill.web-cell.dev/feature/ResizeObserver.js"></script>
</head>

Web workers

self.importScripts('https://polyfill.web-cell.dev/feature/Regenerator.js');

Add more polyfills

  1. For junior engineers, you can submit an issue and wait for the maintainer reaction
  2. For senior engineers, just edit the Polyfill files, and make a pull request
  3. After your pull request reviewd & merged, the polyfills will be updated by GitHub actions automatically

Host your own mirror

  1. Fork this repository
  2. Replace original HTTP domain with yours in GitHub action configuration
  3. You can replace GitHub pages with an Object Storage service (AWS S3, etc.)

China mainland

Thanks for KaiYuanShe's donation, we get a fast local mirror for China mainland:

https://polyfill.kaiyuanshe.cn/

Custom examples

Edit .env content to fit your situation:

WAN_ICON=πŸ‡ΊπŸ‡¦
WAN_HOST=https://polyfill.example.ua
LAN_ICON=πŸ‡·πŸ‡Ί
LAN_HOST=https://polyfill.example.ru

or

WAN_ICON=πŸ‡°πŸ‡·
WAN_HOST=https://polyfill.example.kr
LAN_ICON=πŸ‡°πŸ‡΅
LAN_HOST=https://polyfill.example.kp

Inspired by

  1. https://polyfill.io/
  2. https://polyfiller.kaiyuanshe.cn/

web-polyfill's People

Contributors

techquery avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.