Skip to content

Commit

Permalink
add html injection
Browse files Browse the repository at this point in the history
  • Loading branch information
Vince Speelman committed Jul 1, 2016
1 parent 189caa9 commit dfebd7b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
26 changes: 26 additions & 0 deletions bs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
var html_out = process.env.npm_package_config_html_out;
var css_out = process.env.npm_package_config_css_out;
var out = process.env.npm_package_config_out;

/**
* Require Browsersync
*/
var bs = require('browser-sync').create();

/**
* Run Browsersync with server config
*/
bs.init({
server: out,
files: [css_out],
port: 1337,
open: false,
plugins: [
{
module: 'bs-html-injector',
options: {
files: [html_out]
}
}
]
});
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"css_entry": "app/styles/index.css",
"css_out": "dist/styles/",
"html_in": "app/*.html",
"html_out": "dist/*.html",
"out": "dist/"
},
"scripts": {
Expand All @@ -16,7 +17,7 @@
"css:build": "npm run css:compile -- $npm_package_config_css_entry -d $npm_package_config_css_out",
"html:compile": "cp $npm_package_config_html_in $npm_package_config_out",
"html:watch": "chokidar $npm_package_config_html_in -c 'npm run html:compile'",
"serve": "browser-sync start --server $npm_package_config_out --files $npm_package_config_out --port 1337 --no-open",
"serve": "node bs.js",
"start": "npm-run-all html:compile css:build && npm-run-all -p *:watch serve"
},
"repository": {
Expand All @@ -37,17 +38,18 @@
},
"homepage": "https://github.com/VinSpee/shed-starter#readme",
"devDependencies": {
"browser-sync": "2.12.10",
"browser-sync": "2.13.0",
"bs-html-injector": "3.0.2",
"chokidar-cli": "1.2.0",
"npm-run-all": "2.1.1",
"npm-run-all": "2.3.0",
"postcss": "5.0.21",
"postcss-cli": "2.5.2",
"postcss-conditionals": "2.0.2",
"postcss-cssnext": "2.5.2",
"postcss-cssnext": "2.7.0",
"postcss-each": "0.9.3",
"postcss-for": "2.0.3",
"postcss-import": "8.1.2",
"sanitize.css": "3.3.0",
"shed-css": "file:shed-css"
"shed-css": "latest"
}
}

0 comments on commit dfebd7b

Please sign in to comment.