Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am using windows and xampp, wordpress location is localhost/wp/ but can't use sync #20

Open
aboutjquery opened this issue Aug 9, 2024 · 1 comment

Comments

@aboutjquery
Copy link

I try to modify

 "scripts": {
 "sync": "browser-sync start -p 'localhost/wp' --files '**/*.php' 'build/*.js' 'build/*.css'",

But after npm run sync, the URL will jump to http://localhost/%27localhost/wp%27
Weird, what did I do wrong? Thanks

@randysmachado
Copy link

Hi @aboutjquery

On Windows, you need to use the slash to escape and use double quotes, like this: \"localhost/wp\"

Your code will look like this:
"sync": "browser-sync start -p \"localhost/wp\" --files '**/*.php' 'build/*.js' 'build/*.css'",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@aboutjquery @randysmachado and others