0.7.1 • Published 10 months ago

wpnd v0.7.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

WPND

WPND is a command line tool that provisions a working local WordPress development setup using nodejs and docker (with experimental support for podman). There's an expectation that NodeJS and your container engine of choice is also pre-installed.

A quick test dev environment using config defaults can be spun off leveraging npx by running the following command;

npx --package=wpnd@latest wpnd start

Usage

WPND itself is packaged as a NodeJS package, whilst it can be used as a globally installed package, but it's probably better to use it as local installed package so switching versions is easy and your project experience is consistent across machines.

Ideally WPND expects a src directory that mirrors the directory structure for wp-content, the only difference here is said src directory would only contain the functionality being prototyped. So, for example when creating a theme, a theme directory is created in the specified project src directory.

One might then provision an environment for the project, by running the start command wpnd provides. it's also possible to make customizations to the provisioned environment and inform wpnd of deviations from the default project structure expectations by specifying a config file. Checkout the playground here for ideas on structuring your project.

Config Files

WPND currently supports a wpnd.config.json file. It is expected to be in the project working directory, adjacent to the project src directory. An alternative path to the config file might could be provided with --config <file> option, when this is done the resolution of the srcDir and distDir will be relative to the containing directory of the config file.

Config Options

PropertyDescriptionTypeDefault
nameName of container that will be created for projectstring
distDirName of custom directory where artifact required for wpnd will be storedstring.wpnd
srcDirName of directory contain the theme/plugins we intend to developstringsrc
engineContainer engine to use to provision environmentstringdocker
environment.portvalue at which the wordpress installation should be available atstring8085
environment.db.namespecifies the name of the database to use, if it doesn't exist it will be createdstringexampledb
environment.db.userspecifies the user that should be attached to said databasestringexampleuser
environment.db.passwordprovides the password to the database in questionstringexamplepass
environment.skipEngineCheckWhen enabled, a check is performed to ensure the user actually has the container engine specifiedbooleanfalse
environment.rebuildOnStartDetermines if the docker image in use should be rebuilt on every startbooleanfalse
wpackagistSpecify themes or plugins from wpackagist to be bundled by default in the provision environment, config follows the same definition that would be specified in a composer config fileobject{}
0.7.1

10 months ago

0.7.0

10 months ago

0.6.0

11 months ago

0.5.0

12 months ago

0.4.0

12 months ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago