mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-12 05:31:41 +00:00
update
This commit is contained in:
43
node_modules/bs-recipes/recipes/grunt.html.injection/Gruntfile.js
generated
vendored
Normal file
43
node_modules/bs-recipes/recipes/grunt.html.injection/Gruntfile.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
// This shows a full config file!
|
||||
module.exports = function (grunt) {
|
||||
grunt.initConfig({
|
||||
watch: {
|
||||
files: 'app/scss/**/*.scss',
|
||||
tasks: ['bsReload:css']
|
||||
},
|
||||
sass: {
|
||||
dev: {
|
||||
files: {
|
||||
'app/css/main.css': 'app/scss/main.scss'
|
||||
}
|
||||
}
|
||||
},
|
||||
browserSync: {
|
||||
dev: {
|
||||
options: {
|
||||
watchTask: true,
|
||||
server: './app',
|
||||
plugins: [
|
||||
{
|
||||
module: "bs-html-injector",
|
||||
options: {
|
||||
files: "./app/*.html"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
bsReload: {
|
||||
css: "main.css"
|
||||
}
|
||||
});
|
||||
|
||||
// load npm tasks
|
||||
grunt.loadNpmTasks('grunt-contrib-sass');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-browser-sync');
|
||||
|
||||
// define default task
|
||||
grunt.registerTask('default', ['browserSync', 'watch']);
|
||||
};
|
8
node_modules/bs-recipes/recipes/grunt.html.injection/app/css/main.css
generated
vendored
Normal file
8
node_modules/bs-recipes/recipes/grunt.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/grunt.html.injection/app/index.html
generated
vendored
Normal file
16
node_modules/bs-recipes/recipes/grunt.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 Grunt + HTML Injection Example</title>
|
||||
<link rel='stylesheet' href='css/main.css'>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<h1>Browsersync Grunt, SASS & HTML injection Example</h1>
|
||||
<p>Any changes you make to the HTML will be injected</p>
|
||||
</header>
|
||||
|
||||
</body>
|
||||
</html>
|
2
node_modules/bs-recipes/recipes/grunt.html.injection/desc.md
generated
vendored
Normal file
2
node_modules/bs-recipes/recipes/grunt.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`
|
17
node_modules/bs-recipes/recipes/grunt.html.injection/package.json
generated
vendored
Normal file
17
node_modules/bs-recipes/recipes/grunt.html.injection/package.json
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "bs-recipes-grunt-html-injection",
|
||||
"version": "1.0.0",
|
||||
"description": "Grunt, SASS, HTML/CSS injection example",
|
||||
"main": "Gruntfile.js",
|
||||
"scripts": {
|
||||
"start": "grunt"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"bs-html-injector": "3.0.1",
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-browser-sync": "^2.0.0",
|
||||
"grunt-contrib-sass": "^0.9.2",
|
||||
"grunt-contrib-watch": "^0.6.1"
|
||||
}
|
||||
}
|
79
node_modules/bs-recipes/recipes/grunt.html.injection/readme.md
generated
vendored
Normal file
79
node_modules/bs-recipes/recipes/grunt.html.injection/readme.md
generated
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
#Browsersync - Grunt, SASS, 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/grunt.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 `Gruntfile.js`:
|
||||
```js
|
||||
// This shows a full config file!
|
||||
module.exports = function (grunt) {
|
||||
grunt.initConfig({
|
||||
watch: {
|
||||
files: 'app/scss/**/*.scss',
|
||||
tasks: ['bsReload:css']
|
||||
},
|
||||
sass: {
|
||||
dev: {
|
||||
files: {
|
||||
'app/css/main.css': 'app/scss/main.scss'
|
||||
}
|
||||
}
|
||||
},
|
||||
browserSync: {
|
||||
dev: {
|
||||
options: {
|
||||
watchTask: true,
|
||||
server: './app',
|
||||
plugins: [
|
||||
{
|
||||
module: "bs-html-injector",
|
||||
options: {
|
||||
files: "./app/*.html"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
bsReload: {
|
||||
css: "main.css"
|
||||
}
|
||||
});
|
||||
|
||||
// load npm tasks
|
||||
grunt.loadNpmTasks('grunt-contrib-sass');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-browser-sync');
|
||||
|
||||
// define default task
|
||||
grunt.registerTask('default', ['browserSync', 'watch']);
|
||||
};
|
||||
```
|
||||
|
Reference in New Issue
Block a user