This commit is contained in:
pakerpale
2020-11-08 18:34:31 +09:00
parent 20c9739ba9
commit b5f92c5127
3151 changed files with 928399 additions and 28 deletions

View File

@@ -0,0 +1,16 @@
var fs = require('fs'),
sprintf = require('sprintf');
if (process.argv.length <= 2) {
console.log('You need to enter title');
return;
}
var content = fs.readFileSync('./template.html').toString(),
title = process.argv[2];
content = sprintf(content, {
title: title
});
fs.writeFileSync(sprintf('./%s.html', title.replace(/\//g, '-')), content);