Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Question on Gruntfile.js Line 200 #575

Closed
DaveyJake opened this issue Dec 2, 2015 · 4 comments
Closed

Question on Gruntfile.js Line 200 #575

DaveyJake opened this issue Dec 2, 2015 · 4 comments

Comments

@DaveyJake
Copy link

I know I probably sound like an idiot but when viewing Gruntfile.js, this is all I see from lines 198-200:

    grunt.registerTask('browser-sync', ['browserSync', 'watch']);
    grunt.registerTask('default', ['watch']);
};

The instructions say we are to add our local WP-Server address to line 200. The only line where there's any indication of adding URL or any kind is at Line 180 for the proxy value. Shouldn't that be where we add the address of our local WP-Server -- Line 180?

I just want clarification as I'm confused by the instructions given.

@Luciaisacomputer
Copy link
Contributor

I think the line numbers are wrong, look for this block of code

browserSync: {
            dev: {
                bsFiles: {
                    src : [
                        'assets/stylesheets/*.css',
                        '**/*.php',
                        'assets/javascript/**/*.js'
                    ]
                },
                options: {
                    watchTask: true,
                    // fill in proxy address of local WP server
                    proxy: ""
                }
            }
        }

the proxy server is what you want to change under options. For my WordPress site I simply just put in site.dev. I'm running AMPPS for my server.

@DaveyJake
Copy link
Author

That's what I was thinking too about the line numbers being wrong. Definitely going to add my local dev to the proxy key. On a side note, I also found adding my local dev to Line 199 also works.

    grunt.registerTask('default', ['http://local.dev/','watch']);

I'm using my Mac's native stack w/ MariaDB and DNSMasq as my server. MariaDB & DNSMasq were both installed using Homebrew.

@colin-marshall
Copy link
Collaborator

The line # has changed over time since Browsersync was first implemented and the README needs an update to reflect that. @LukePettway has pointed out the correct location to place the URL.

@olefredrik
Copy link
Owner

We just switched from Grunt to Gulp. This will be the correct place to add your local dev URL:

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

No branches or pull requests

4 participants