main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
374 bytes
|
Line | |
---|
1 | const fs = require('fs')
|
---|
2 | const JSON5 = require('./')
|
---|
3 |
|
---|
4 | // eslint-disable-next-line node/no-deprecated-api
|
---|
5 | require.extensions['.json5'] = function (module, filename) {
|
---|
6 | const content = fs.readFileSync(filename, 'utf8')
|
---|
7 | try {
|
---|
8 | module.exports = JSON5.parse(content)
|
---|
9 | } catch (err) {
|
---|
10 | err.message = filename + ': ' + err.message
|
---|
11 | throw err
|
---|
12 | }
|
---|
13 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.