Using with CMSs and frameworks¶
WordPress¶
The recommended directory structure for WordPress is:
repo/
├── bower_components/ # Bower packages
├── www/
│ └── wp-content/
│ └── themes/
│ └── mytheme/
│ ├── build/ # Build files
│ ├── src/ # Source files
│ │ ├── main.css/
│ │ └── main.js/
│ └── style.css # Theme config (no CSS code!)
└── awe.yaml # Awe config
With the following configuration:
ASSETS:
default:
src: www/wp-content/themes/mytheme/src/
dest: www/wp-content/themes/mytheme/build/
bower: bower_components/
autoprefixer: true
style.css
should only contain the file header that WordPress requires – for example:
/*
Theme Name: My Theme
...
*/
Then main.css
should be used in the HTML code (instead of bloginfo('stylesheet_url')
):
<link rel="stylesheet" href="<?= get_template_directory_uri() ?>/build/main.css">
Laravel 5¶
The recommended directory structure for Laravel 5 is:
repo/
├── app/
├── bower_components/ # Bower packages
├── public/
│ └── assets/ # Build files
├── resources/
│ └── assets/ # Source files
│ ├── main.css/
│ └── main.js/
└── awe.yaml # Awe config
With the following configuration:
ASSETS:
default:
src: resources/assets/
dest: public/assets/
bower: bower_components/
autoprefixer: true
Laravel 4¶
The recommended directory structure for Laravel 4 is:
repo/
├── app/
│ └── assets/ # Source files
│ ├── main.css/
│ └── main.js/
├── bower_components/ # Bower packages
├── public/
│ └── assets/ # Build files
└── awe.yaml # Awe config
With the following configuration:
ASSETS:
default:
src: app/assets/
dest: public/assets/
bower: bower_components/
autoprefixer: true