Fixed reloading of browser when developing
This commit is contained in:
10
bs-config.cjs
Normal file
10
bs-config.cjs
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
port: 3000,
|
||||
server: "./dist",
|
||||
files: "./dist/**/*",
|
||||
watchOptions: {
|
||||
usePolling: true,
|
||||
interval: 200,
|
||||
binaryInterval: 200
|
||||
}
|
||||
}
|
||||
1941
package-lock.json
generated
1941
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -6,9 +6,9 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"dev": "concurrently --kill-others -n Build,Serve -c auto \"npm run watch-build\" \"npm run serve\"",
|
||||
"watch-build": "nodemon --ext js,ts,json,md,html --watch notes --watch src --watch packages/@zblog/toolchain/src --watch markdown.ts --exec \"npm run build --workspaces && npm run build && npm run generate-blog\"",
|
||||
"watch-build": "nodemon --ext js,ts,json,md,html --watch notes --watch src --watch templates --watch packages/@zblog/toolchain/src --watch markdown.ts --exec \"npm run build --workspaces && npm run build && npm run generate-blog\"",
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"serve": "serve dist",
|
||||
"serve": "browser-sync start --config bs-config.cjs",
|
||||
"generate-blog": "node bin/index.js",
|
||||
"initialize-firebase": "npm install -g firebase-tools && firebase login",
|
||||
"deploy": "npm run generate-blog && firebase deploy"
|
||||
@@ -20,9 +20,9 @@
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.11.5",
|
||||
"browser-sync": "^3.0.4",
|
||||
"concurrently": "^8.2.1",
|
||||
"nodemon": "^3.0.1",
|
||||
"serve": "^14.2.1",
|
||||
"typescript": "^5.3.3"
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ export class StartPagePlugin implements IPluginBuilder {
|
||||
${links.join("")}
|
||||
`;
|
||||
htmlTemplate = htmlTemplate.replace("{{content}}", html);
|
||||
console.log("Generating index", this.options.indexTemplatePath);
|
||||
writeTextAsFile(
|
||||
`${builderContext.outputDirectory}/index.html`,
|
||||
htmlTemplate
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<title>Document</title>
|
||||
<style>
|
||||
html {
|
||||
font-size: 17px;
|
||||
font-size: 18px;
|
||||
line-height: 26px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
Reference in New Issue
Block a user