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

netlify-plugin-cloudflare-pages-deploy

v0.9.3

Published

**Deploy your static site to [the Fastest web hosting network in the world ⚡️](https://pages.cloudflare.com/) from [the Greatest DX web hosting platform 🚀](https://netlify.app/).**

Downloads

4

Readme

Cloudflare Pages Deploy Plugin

Deploy your static site to the Fastest web hosting network in the world ⚡️ from the Greatest DX web hosting platform 🚀.

NPM

An awesome plugin to make you Netlify as a CI/CD tool for Cloudflare Pages

What is this?

This is a simple plugin for Netlify to deploy your static site to Cloudflare Pages. This plugin is suitable for making CI/CD with Netlify, but hosting your static site on Cloudflare Pages.

Why

Cause Netlify has a great Developer Experience CI/CD platform for many javascript frameworks.

  • It's easy to configure.
  • Widely runtimes and package manager supports.
  • Multiple build environment and deployment scopes Eg. Production, Deploy Previews and Branch deploys (separated for each branches)
  • Great build caching and build time.
  • There are many ready-to-integrate plugins (and local customized plugin supports)

But Cloudflare Pages is lightning fast ⚡️ and has much better network latency than Netlify. Your sites will deploy on Cloudflare's edge network that's the fastest network in the world.

See more about: Cloudflare Pages is Lightning Fast

How it works?

This plugin is using Cloudflare Wrangler for under-the-hood to deploy your site to Cloudflare Pages. It will run $ wrangler pages deploy <PUBLISH_DIR> --project-name=<PROJECT_NAME> --branch=<BRANCH> command after Netlify build your site.

How to use?

Installation

# npm
$ npm install -D netlify-plugin-cloudflare-pages-deploy

# yarn
$ yarn add -D netlify-plugin-cloudflare-pages-deploy

# pnpm
$ pnpm add -D netlify-plugin-cloudflare-pages-deploy

Inputs

  • package_exec: Package exec to use Eg. npx, pnpx or install wrangler to devDeps and use npm, yarn and pnpm instead (caching support and recommended this) Default: npx
  • deploy_target_branch: Deploy target branch. For production deploy, use production in this config. Default: use netlify current deploy branch

Setup

  1. Prepare your Cloudflare Page project via wrangler
$ npx wrangler pages project create <PROJECT_NAME> --production-branch=main
  1. Add Environment Variables to Netlify

  2. Add this plugin to your netlify.toml

# for all deploy contexts (production, branch deploys, Deploy Previews).

[[plugins]]
   package = "netlify-plugin-cloudflare-pages-deploy"
   [plugins.inputs]
      package_exec = "pnpx"
# for production deploy context. supports [`production`, `deploy-preview`, `branch-deploy`, `dev`]

[[context.production.plugins]]
	package = "netlify-plugin-cloudflare-pages-deploy"
	[context.production.plugins.inputs]
		package_exec = "pnpx"
		deploy_target_branch = "main"

[Recommend]

Add wrangler to your project and use your lover package managers likenpm, yarn or pnpm to run wrangler command instead npx or pnpx.

This will make your build faster cause Netlify always caching dependencies and wrangler will be cached too.

For yarn and yarn Workspace

$ yarn add -D wrangler
[[plugins]]
   package = "netlify-plugin-cloudflare-pages-deploy"
   [plugins.inputs]
      package_exec = "yarn"

For pnpm

$ pnpm add -D wrangler
[[plugins]]
   package = "netlify-plugin-cloudflare-pages-deploy"
   [plugins.inputs]
      package_exec = "pnpm exec"

For pnpm Workspace

$ pnpm add -D wrangler --filter <APP_NAME>
[[plugins]]
   package = "netlify-plugin-cloudflare-pages-deploy"
   [plugins.inputs]
      package_exec = "pnpm --filter <APP_NAME> -- exec"

For more information about:

  • Deploy Context: https://docs.netlify.com/site-deploys/overview/#deploy-contexts
  • Netlify Plugin: https://docs.netlify.com/integrations/build-plugins/
  • Cloudflare Pages Direct Upload: https://developers.cloudflare.com/pages/how-to/use-direct-upload-with-continuous-integration/
  • Cloudflare Wrangler Commands: https://developers.cloudflare.com/workers/wrangler/commands/#pages