font-awesome-animation/scripts/generate_banner.js

22 lines
479 B
JavaScript
Raw Normal View History

2021-01-22 15:54:13 +08:00
const Handlebars = require('handlebars');
const fs = require('fs');
const pjson = require('../package.json');
const template = Handlebars.compile('/*!\n' +
' * {{ name }} - v{{ version }}\n' +
' * https://github.com/{{ author }}/{{ name }}\n' +
' * License: MIT\n' +
' */');
const result = template(pjson);
const outputFilePath = process.argv.slice(1)[1];
fs.writeFile(outputFilePath, result, err => {
if (err) {
console.log(err);
process.exit(1);
}
});