Documentation
Getting Started
Assets

Assets

WP Bones uses gulp (opens in a new tab) to compile and copy the assets from the resources/assets folder to the public folder. It supports:

  • CSS (Less, Sass)
  • Javascript (ES6, Typescript)
  • ReactJS

Installation

To compile the assets, you need to install the packages:

npm install

Package.json

The package.json file contains the scripts to compile the assets:

{
  "scripts": {
    "dev": "gulp watch",
    "build": "gulp build"
  },
}

To compile the assets, you need to install the dependencies:

npm run dev

All the assets in resources/assets are compiled and copied to the public folder.

Your development source assets:

        • my-styles-1.lessless
        • my-styles-2.scssSass
        • my-script.jsJavascript
        • my-hook.tsTypescript
        • my-react-component.jsxReactJS
  • Will be compiled and copied to the public folder:

      • my-styles-1.cssCSS
      • my-styles-2.cssCSS
      • my-script.jsJavascript
      • my-hook.jsJavascript
      • my-react-component.jsJavascript
  • Gulpfile.js

    The gulpfile.js in the root folder contains the tasks to compile the assets. Feel free to modify the tasks to fit your needs.

    More complex ReactJS components or applications

    If you need to create more complex ReactJS components or applications, checkout the ReactJS Components section and the ReactJS Applications section.