Download the PHP package nabasa/vp-wp without Composer

On this page you can find all versions of the php package nabasa/vp-wp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vp-wp

vp-wp

build status npm version npm downloads composer version composer downloads pkg.pr.new license

vp-wp brings a modern Vite+ workflow to WordPress plugins and themes.

Use it to build and serve frontend assets with WordPress-friendly defaults, a compact TypeScript API, and a lightweight PHP runtime.

Install

Install the JavaScript package with Vite+:

If you also want the PHP runtime helpers through Composer:

If you are not using Composer, copy vp-wp.php into your plugin or theme and require it manually.

Migration

Moving from @kucrut/vite-for-wp? See docs/migrating-from-vite-for-wp.md.

Vite+ config

A minimal Vite+ config looks like this:

Then run the usual Vite+ commands:

wordpress() applies WordPress-friendly defaults:

These defaults keep asset URLs, manifests, and CSS handling aligned with WordPress expectations.

wordpressExternals() keeps common WordPress globals out of your bundle and treats React as external by default.

PHP runtime

A typical enqueue setup looks like this:

Exposed PHP runtime API:

Supported public API:

Advanced callable helpers:

Internal and compatibility helpers:

Core PHP filters:

Use assets() when you want to bind a manifest directory once and reuse it across hooks or callbacks:

Pass a second argument to assets() when you want a plugin- or theme-specific hook namespace:

Scoped helpers still trigger the shared nabasa_vite_plus/* hooks as well as the scoped nabasa_vite_plus/{scope}/* hooks. The scope is normalized with sanitize_key().

If you prefer standalone functions, register_asset() and enqueue_asset() accept the same scope as a fourth argument.

Supported PHP options include:

During vp dev, vp-wp reads vite-dev-server.json and serves assets from the active dev server. During vp build, it reads manifest.json and registers the compiled JavaScript and extracted CSS assets.

Use asset_url() when you need the public URL for a file in the built assets directory without looking it up in the manifest:

Externals presets

Pick a preset when you want tighter control over which globals stay external:

Built-in presets:

You can also extend or trim the externals map to fit your project:

Development

Credits

vp-wp is a fork and rewrite inspired by @kucrut/vite-for-wp.

Examples

Need a working reference? See examples/README.md for React, Vue, Svelte, SolidJS, and vanilla JavaScript. Each example includes the full plugin structure, Vite config, PHP bootstrap, and frontend entry for its framework.


All versions of vp-wp with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nabasa/vp-wp contains the following files

Loading the files please wait ...