mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-12-05 05:34:29 +01:00
1ada95e04a
- Convert project to Javascript/Typescript - Allow custom headers to be passed in (optional) - Allow body to be optional
10 lines
289 B
JavaScript
Executable file
10 lines
289 B
JavaScript
Executable file
#!/usr/bin/env node
|
|
|
|
'use strict';
|
|
|
|
var fs = require('fs');
|
|
var name = process.argv[2] || '.';
|
|
var property = process.argv[3] || 'version';
|
|
if (name != '.') name = 'node_modules/' + name;
|
|
var json = JSON.parse(fs.readFileSync(name + '/package.json', 'utf8'));
|
|
console.log(json[property]);
|