BlueGit

blue-star danique-bot

Files

danique-bot / node_modules / ajv / scripts / info

info

Import template
timfa Tim · pushed by timfa · 4 years ago
c788ad20 History
info 289 B Download Raw
1#!/usr/bin/env node
2
3'use strict';
4
5var fs = require('fs');
6var name = process.argv[2] || '.';
7var property = process.argv[3] || 'version';
8if (name != '.') name = 'node_modules/' + name;
9var json = JSON.parse(fs.readFileSync(name + '/package.json', 'utf8'));
10console.log(json[property]);