UNPKG
fatstraw
Version:
latest (1.4.0)
1.4.0
1.3.0
1.2.0
1.1.0
1.0.0
CLI for ingesting data into the ArcGIS Big Data Store
github.com/dmfenton/fatstraw
dmfenton/fatstraw
fatstraw
/
lib
/
ingest
/
get-configuration.js
13 lines
(12 loc)
•
301 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
const
fs =
require
(
'fs'
)
module
.
exports
=
function
getConfig
(
cmd
) {
if
(cmd.
configuration
) {
return
JSON
.
parse
(fs.
readFileSync
(cmd.
configuration
)) }
else
{
try
{
return
JSON
.
parse
(fs.
readFileSync
(
`
${cmd.service}
-configuration.json`
)) }
catch
(e) {
return
null
} } }