UNPKG
generator-wxnode-boilerplate
Version:
latest (0.1.2)
0.1.2
Yeoman generator for wxnode boilerplate
generator-wxnode-boilerplate
/
node_boilerplate
/
templates
/
config
/
lib.js
12 lines
(10 loc)
•
290 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
const
ini =
require
(
'ini'
);
const
fs =
require
(
'fs'
);
module
.
readMetaFile
=
function
(
path
){
try
{
let
fileContent = fs.
readFileSync
(path,
'utf8'
);
return
ini.
parse
(fileContent); }
catch
(error) {
console
.
error
(
`Fail to read file,
${path}
${error}
`
); } }