Let's Start
Get Framework
Download fresh copy of XeFramework and extract it to you development environment. Change folder name to your theme name. e.g: xurais
or xu-rais
.
Install Nodejs
Nodejs is a JavaScript runtime built on Chrome's V8 JavaScript engine. Install the latest version from their website if you don't have it installed already. You can check Nodejs
version using the following command.
node -v
You can check npm
version using the following command.
npm -v
Install Gulp
We use Gulp to automate and enhance our theme development. Install gulp
globally using following command.
npm install gulp -g
Initialization
- Navigate to
node_scripts
folder. - Open
config.json
with your favorite editor. -
Change
name
to your theme name. eg:Xurais
orXu Rais
(Capitalized)."name": "Xurais",
-
Change the
proxy
to your local WordPress site url. eg:localhost/xurais/
(Without http://)."proxy": "localhost/xurais/",
-
Open command line, navigate to project folder and run this command to install dependencies:
npm install
-
Now run following command to automatically change
text-domain
,prefixes
andDocBlocks
to your theme name.gulp init
Build
Open config.json
inside node_scripts
folder and change build
path to your desired location.
"build": "E:/Projects/Xe Framework",
Once you have completed your theme, run the below command to generate a clean copy. .pot
file will also be generated inside languages folder.
gulp build