Get started
Let's get started with PressWind.
Installation
Before starting, control the tools required on this page
Clone the theme
Go to your theme directory.
Normally, it's in wp-content/themes
With git, clone the starter theme in this theme directory
git clone [email protected]:WP-Performance/press-wind.git
Define the environment
In the file wp-config.php
, add this declarations :
// for dev
define('WP_ENV', 'development');
// for production
// define('WP_ENV', 'production');
On your computer during the phase of development, use
development
If you don't declare WP_ENV
, by default isdevelopment
Assets loader
In the file functions.php
, the assets are loaded with this lines :
/**
* init assets front
* require presswind plugin to work
*/
if (class_exists('PressWind\PWVite')) {
// front
\PressWind\PWVite::init(port: 3000, path: '');
/**
* init assets admin
*/
\PressWind\PWVite::init(
port: 4444,
path: '/admin',
position: 'editor',
is_ts: false
);
}
Main command
Open the terminal on your computer and going in the theme root previously installed.
In Visual Studio Code, click right on the theme folder and choose "Open in Integrated Terminal"
if you not confortable with git, you can download the theme directly on the repo
Install the dependencies
npm
npm install
Start the development mode
npm
npm run dev
Start to coding !