-
Notifications
You must be signed in to change notification settings - Fork 757
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Shane Osbourne <sosbourne@duckduckgo.com>
- Loading branch information
1 parent
f91440e
commit 62d906e
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* | ||
* Install: | ||
* npm install browser-sync | ||
* | ||
* Run: | ||
* node <yourfile.js> | ||
* | ||
* This example shows how you can place the snippet anywhere. | ||
*/ | ||
|
||
"use strict"; | ||
|
||
var path = require("path"); | ||
var browserSync = require("../packages/browser-sync").create(); | ||
var cwd = path.join(__dirname, ".."); | ||
var fixtures_dir = path.join(cwd, "packages/browser-sync/test/fixtures"); | ||
|
||
browserSync.init({ | ||
files: [path.join(fixtures_dir, "css/*.css")], | ||
server: fixtures_dir, | ||
snippetOptions: { | ||
rule: { | ||
match: /<\/head>/i, | ||
fn: function (snippet, match) { | ||
return snippet + match; | ||
}, | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters