Skip to content

Commit

Permalink
Updates docs/yarn-scripts/overview.md
Browse files Browse the repository at this point in the history
Auto commit by GitBook Editor
  • Loading branch information
atanas-dev committed Jun 12, 2018
1 parent 7a1c316 commit e2444f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 1 addition & 8 deletions docs/asset-pipeline/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,7 @@ The WP Emerge Theme comes with a powerful asset build process which covers a mul
1. Run your desired build process:
- To run the build process in production mode run `yarn build`
- To run the build process in development mode run `yarn dev`. This will also watch files for changes and run Browsersync.

## Browsersync

By default, Browsersync will setup a simple web server and serve your files through a custom port in order to establish a communication channel between the build process and your browser like this:
`http://localhost:3000/`

This is not ideal when working on WordPress projects that are setup in a subdirectory, for example. To let Browsersync know your site's url simply pass it as a parameter when running the dev task:
`yarn dev --dev-url=http://localhost/my/nested/subdirectory/wordpress/`
- For more information, check out the [Yarn Scripts](../yarn-scripts/overview.md) article.

## Importing assets

Expand Down
10 changes: 9 additions & 1 deletion docs/yarn-scripts/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## `yarn dev`

Run the build process in development mode and enable Browsersync.
Run the build process in development mode and enable [Browsersync](#browsersync).

## `yarn build`

Expand All @@ -15,3 +15,11 @@ Run the scripts and styles linters (`eslint` and `stylelint` respectively), repo
## `yarn lint-fix`

Run the scripts and styles linters (`eslint` and `stylelint` respectively), fixing any fixable lint rule violations.

## Browsersync

By default, Browsersync will setup a simple web server and serve your files through a custom port in order to establish a communication channel between the build process and your browser like this:
`http://localhost:3000/`

This is not ideal when working on WordPress projects that are setup in a subdirectory, for example. To let Browsersync know your site's url simply pass it as a parameter when running the dev task:
`yarn dev --dev-url=http://localhost/my/nested/subdirectory/wordpress/`

0 comments on commit e2444f6

Please sign in to comment.