工事中
# プロジェクト直下で実行
npm init --yes
# handlebarsをinstall
npm install handlebars
make.js
const Handlebars = require("handlebars");
const template = Handlebars.compile("Name: {{name}}");
console.log(template({ name: "Nils" }));
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "node make.js >> output.html"
},
npm run build
Name: Nils
const fs = require('fs');
let text = fs.readFileSync("sample.txt");
https://qiita.com/shirokuman/items/509b159bf4b8dd1c41ef
"scripts": {
"test": "node make.js",
"build": "node make.js >> output_`date +%Y%m%d%H%M%S`.html"
},
https://uchy.me/blog/20240617006/
npm install marked
https://handlebarsjs.com/installation/#npm-or-yarn-recommended