From d81b6fdb87af36c2429e4966a5111448bf47454b Mon Sep 17 00:00:00 2001 From: Ben Word Date: Sun, 4 Sep 2016 21:46:52 -0600 Subject: [PATCH] Update README [ci skip] --- README.md | 28 ++++++++++++++++------------ functions.php | 8 ++++---- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 2047f4740c..7b50cbf664 100644 --- a/README.md +++ b/README.md @@ -36,29 +36,33 @@ $ composer create-project roots/sage your-theme-name dev-master ## Theme structure ```shell -themes/theme-name/ # → Root of your Sage based theme +themes/your-theme-name/ # → Root of your Sage based theme ├── assets # → Front-end assets │   ├── config.json # → Settings for compiled assets +│   ├── build/ # → Webpack and ESLint config │   ├── fonts/ # → Theme fonts │   ├── images/ # → Theme images │   ├── scripts/ # → Theme JS │   └── styles/ # → Theme stylesheets ├── composer.json # → Autoloading for `src/` files -├── composer.lock # → Composer lock file (never manually edit) -├── dist/ # → Built theme assets (never manually edit) -├── functions.php # → Never manually edit +├── composer.lock # → Composer lock file (never edit) +├── dist/ # → Built theme assets (never edit) +├── functions.php # → Composer autoloader, theme includes ├── index.php # → Never manually edit -├── node_modules/ # → Node.js packages (never manually edit) +├── node_modules/ # → Node.js packages (never edit) ├── package.json # → Node.js dependencies and scripts ├── screenshot.png # → Theme screenshot for WP admin ├── src/ # → Theme PHP +│   ├── lib/Sage/ # → Theme wrapper, asset manifest +│   ├── admin.php # → Theme customizer setup +│   ├── filters.php # → Theme filters +│   ├── helpers.php # → Helper functions +│   └── setup.php # → Theme setup ├── style.css # → Theme meta information ├── templates/ # → Theme templates │   ├── layouts/ # → Base templates │   └── partials/ # → Partial templates -├── vendor/ # → Composer packages (never manually edit) -├── watch.js # → Webpack/BrowserSync watch config -└── webpack.config.js # → Webpack config +└── vendor/ # → Composer packages (never edit) ``` ## Theme setup @@ -80,7 +84,7 @@ $ npm install You now have all the necessary dependencies to run the build process. -### Available build commands +### Build commands * `npm run build` — Compile and optimize the files in your assets directory * `npm run start` — Compile assets when file changes are made, start BrowserSync session @@ -88,16 +92,16 @@ You now have all the necessary dependencies to run the build process. ### Using BrowserSync -To use BrowserSync during `npm watch` you need to update `devUrl` at the bottom of `assets/config.json` to reflect your local development hostname. +To use BrowserSync during `npm run start` you need to update `devUrl` at the bottom of `assets/config.json` to reflect your local development hostname. -For example, if your local development URL is `https://project-name.dev` you would update the file to read: +If your local development URL is `https://project-name.dev`, update the file to read: ```json ... "devUrl": "https://project-name.dev", ... ``` -If you are not using [Bedrock](https://roots.io/bedrock/), you should also update `publicPath` to reflect your folder structure: +If you are not using [Bedrock](https://roots.io/bedrock/), update `publicPath` to reflect your folder structure: ```json ... diff --git a/functions.php b/functions.php index 15049060d2..13f151e274 100644 --- a/functions.php +++ b/functions.php @@ -46,10 +46,10 @@ * Please note that missing files will produce a fatal error. */ $sage_includes = [ - 'src/helpers.php', // Helper functions - 'src/setup.php', // Theme setup - 'src/filters.php', // Filters - 'src/admin.php' // Admin + 'src/helpers.php', + 'src/setup.php', + 'src/filters.php', + 'src/admin.php' ]; array_walk($sage_includes, function ($file) { if (!locate_template($file, true, true)) {