mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-12 13:41:40 +00:00
update
This commit is contained in:
20
node_modules/bs-recipes/recipes/html.injection/app.js
generated
vendored
Normal file
20
node_modules/bs-recipes/recipes/html.injection/app.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Require Browsersync
|
||||
*/
|
||||
var bs = require('browser-sync').create();
|
||||
|
||||
/**
|
||||
* Run Browsersync with server config
|
||||
*/
|
||||
bs.init({
|
||||
server: "app",
|
||||
files: ["app/css/*.css"],
|
||||
plugins: [
|
||||
{
|
||||
module: "bs-html-injector",
|
||||
options: {
|
||||
files: ["app/*.html"]
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
8
node_modules/bs-recipes/recipes/html.injection/app/css/main.css
generated
vendored
Normal file
8
node_modules/bs-recipes/recipes/html.injection/app/css/main.css
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
body {
|
||||
background: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
p.lede {
|
||||
font-size: 2em;
|
||||
}
|
16
node_modules/bs-recipes/recipes/html.injection/app/index.html
generated
vendored
Normal file
16
node_modules/bs-recipes/recipes/html.injection/app/index.html
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<!doctype html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Browsersync Server Example</title>
|
||||
<link rel='stylesheet' href='css/main.css'>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<h1>Browsersync HTML injection Examples</h1>
|
||||
<p>Any changes you make to the HTML will be injected</p>
|
||||
</header>
|
||||
|
||||
</body>
|
||||
</html>
|
2
node_modules/bs-recipes/recipes/html.injection/desc.md
generated
vendored
Normal file
2
node_modules/bs-recipes/recipes/html.injection/desc.md
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
To see the live HTML injecting, along with CSS injection, simply perform changes to either `index.html` or `css/main.css`
|
14
node_modules/bs-recipes/recipes/html.injection/package.json
generated
vendored
Normal file
14
node_modules/bs-recipes/recipes/html.injection/package.json
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "bs-recipes-html-injection",
|
||||
"version": "1.0.0",
|
||||
"description": "HTML/CSS injection example",
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
"start": "node app.js"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"bs-html-injector": "^2.0.3",
|
||||
"browser-sync": "^2.1.6"
|
||||
}
|
||||
}
|
56
node_modules/bs-recipes/recipes/html.injection/readme.md
generated
vendored
Normal file
56
node_modules/bs-recipes/recipes/html.injection/readme.md
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
#Browsersync - HTML/CSS injection example
|
||||
|
||||
## Installation/Usage:
|
||||
|
||||
To try this example, follow these 4 simple steps.
|
||||
|
||||
**Step 1**: Clone this entire repo
|
||||
```bash
|
||||
$ git clone https://github.com/Browsersync/recipes.git bs-recipes
|
||||
```
|
||||
|
||||
**Step 2**: Move into the directory containing this example
|
||||
```bash
|
||||
$ cd bs-recipes/recipes/html.injection
|
||||
```
|
||||
|
||||
**Step 3**: Install dependencies
|
||||
```bash
|
||||
$ npm install
|
||||
```
|
||||
|
||||
**Step 4**: Run the example
|
||||
```bash
|
||||
$ npm start
|
||||
```
|
||||
|
||||
### Additional Info:
|
||||
|
||||
|
||||
|
||||
To see the live HTML injecting, along with CSS injection, simply perform changes to either `index.html` or `css/main.css`
|
||||
|
||||
### Preview of `app.js`:
|
||||
```js
|
||||
/**
|
||||
* Require Browsersync
|
||||
*/
|
||||
var bs = require('browser-sync').create();
|
||||
|
||||
/**
|
||||
* Run Browsersync with server config
|
||||
*/
|
||||
bs.init({
|
||||
server: "app",
|
||||
files: ["app/css/*.css"],
|
||||
plugins: [
|
||||
{
|
||||
module: "bs-html-injector",
|
||||
options: {
|
||||
files: ["app/*.html"]
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
```
|
||||
|
Reference in New Issue
Block a user