UNPKG

@openshift-console/dynamic-plugin-sdk-webpack

Version:

Provides webpack ConsoleRemotePlugin used to build all dynamic plugin assets.

13 lines (12 loc) 410 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseJSONC = void 0; const fs = require("fs"); const jsonc = require("comment-json"); /** * Parse the given file as JSON with comments (JSONC). */ const parseJSONC = (filePath, removeComments = true) => { return jsonc.parse(fs.readFileSync(filePath, 'utf-8'), null, removeComments); }; exports.parseJSONC = parseJSONC;