BrowserSync / browser-sync

Keep multiple browsers & devices in sync when building websites. https://browsersync.io
https://discord.gg/2d2xUThp
Apache License 2.0
12.19k stars 757 forks source link

Separate browser actions from server/watcher #267

Closed Martinspire closed 10 years ago

Martinspire commented 10 years ago

I'm currently already running an express server with watcher and was trying to implement Browser Sync (via grunt) to sync the user-actions across multiple devices. So i only need the scrolling, input, clicking and location stuff.

It seems a bit odd to me that i'm pretty much required to use the browser code-editing, running a server, let it check my css (which is generated from my sass and automatically compiled) if i don't really use that. I don't mind including the live-reload javascript file myself and i don't mind running things separately, but i don't really have a say in this. Its pretty much all or nothing.

I think i've used browser-sync via Ghostlab already and that works wonderfull but i'm currently using grunt myself and started using lots of modules that currently don't work very wel lwith Ghostlab or are duplicates (with more settings).

So if you guys could separate the browser-actions from the server-stuff so i can use my own, that would be great ;)

Or if anybody knows how to fit it in my current workflow, i'm all ears.

Current file i tried:

        bsFiles: {
            src : 'frontend/css/main.css'
        },
        options: {
            watchTask: true,
            proxy: "localhost:8000",
            port: 8080,
            ghostMode: {
                clicks: true,
                location: true,
                forms: true,
                scroll: true
            },
            logLevel: "silent",
            online: false,
            notify: true, 
            scrollProportionally: true,
            scrollThrottle: 100,
            reloadDelay: 2000,
            injectChanges: true,
            minify: false, 
            codeSync: true,
            //host: "localhost"
        },

My express is running on port 8000 via grunt-express-server, my livereload on port 8080 (from grunt-contrib-watch which triggers more than just css or javascript) and i just need the stuff from ghostmode.

shakyShane commented 10 years ago

remove the bsFiles option remove the proxy option

No files will be watched & no server started (except the one that serves the JS)