mirror of
https://github.com/l-lin/font-awesome-animation.git
synced 2024-12-28 22:41:31 +08:00
22 lines
479 B
JavaScript
22 lines
479 B
JavaScript
|
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);
|
||
|
}
|
||
|
});
|
||
|
|