d11 theme
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
rdrew f035d16951 lots of layout changes + sidbars 2 weeks ago
..
tests lots of layout changes + sidbars 2 weeks ago
ui lots of layout changes + sidbars 2 weeks ago
.npmignore lots of layout changes + sidbars 2 weeks ago
.travis.yml lots of layout changes + sidbars 2 weeks ago
config.js lots of layout changes + sidbars 2 weeks ago
example.js lots of layout changes + sidbars 2 weeks ago
index.js lots of layout changes + sidbars 2 weeks ago
package.json lots of layout changes + sidbars 2 weeks ago
readme.md lots of layout changes + sidbars 2 weeks ago
utils.js lots of layout changes + sidbars 2 weeks ago

readme.md

bs-rewrite-rules

UI interface for adding/removing/editing Browsersync's rewrite rules

Install

npm i browser-sync bs-rewrite-rules

Usage

var bs = require('browser-sync').create();

bs.init({
    proxy: 'http://www.bbc.co.uk',
    plugins: ['bs-rewrite-rules']
});

Now access the Plugins section of the UI (address given in the console) & you'll be presented with:

ui

Works well with serveStatic

Image you have the frontend assets of a live site on your local machine. You could use Browsersync to proxy the live site & then rewrite the links to point to your local files:

var bs = require('browser-sync').create();

bs.init({
    proxy: 'http://www.bbc.co.uk',
    plugins: ['bs-rewrite-rules'],
    serveStatic: ['assets'],
    rewriteRules: [
        {
            match: 'http://example.com/skin/frontend/sunspel/default/assets/css/core.min.css',
            replace: '/css/core.css'
        }
    ]
});