Skip to content

Commit

Permalink
Update README [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
retlehs committed Sep 5, 2016
1 parent 270b1c7 commit d81b6fd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -80,24 +84,24 @@ $ 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
* `npm run build:production` — Compile assets for production

### 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
...
Expand Down
8 changes: 4 additions & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit d81b6fd

Please sign in to comment.