UNPKG
@forwardslashns/fws-cli
Version:
latest (0.4.29)
0.4.29
0.4.28
0.4.27
0.4.26
0.4.25
0.4.24
0.4.23
0.4.22
0.4.21
0.4.20
0.4.19
0.4.18
0.4.17
0.4.16
0.4.15
0.4.14
0.4.13
0.4.12
0.4.11
0.4.10
0.4.9
0.4.8
0.4.7
0.4.6
0.4.5
0.4.3
0.4.2
0.4.1
CLI meant to work together with other Forwardslash boilerplates.
forwardslashny.com
@forwardslashns/fws-cli
/
src
/
util
/
getPackageJson.js
10 lines
(9 loc)
•
230 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{ readFileSync }
from
'fs'
;
export
const
getPackageJson
= (
path
) => {
try
{
const
packageJson =
JSON
.
parse
(
readFileSync
(path,
'utf-8'
));
return
packageJson; }
catch
(e) {
return
{}; } };