aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tools/file-system-utility.js
diff options
context:
space:
mode:
authorDanijel Andjelkovic <adanijel99@gmail.com>2022-03-01 21:54:41 +0100
committerDanijel Andjelkovic <adanijel99@gmail.com>2022-03-01 21:54:41 +0100
commit6c8128f9fd5a5d0be115806c35a21b3d683df8d6 (patch)
treef46c2f6b3b9b294ff32bd75c08ccdc9e7a8cc4ef /sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tools/file-system-utility.js
parent2400b84e95913665da6279114168148444b8f9ab (diff)
parent7d3640f824f46490b47bd95f1c5a16644f712068 (diff)
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into logo
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tools/file-system-utility.js')
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tools/file-system-utility.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tools/file-system-utility.js b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tools/file-system-utility.js
new file mode 100644
index 00000000..e8499727
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tools/file-system-utility.js
@@ -0,0 +1,26 @@
+"use strict";
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.readJsonFile = void 0;
+const schematics_1 = require("@angular-devkit/schematics");
+const fs_1 = require("fs");
+const jsonc_parser_1 = require("jsonc-parser");
+function readJsonFile(path) {
+ if (!(0, fs_1.existsSync)(path)) {
+ throw new schematics_1.FileDoesNotExistException(path);
+ }
+ const errors = [];
+ const content = (0, jsonc_parser_1.parse)((0, fs_1.readFileSync)(path, 'utf-8'), errors, { allowTrailingComma: true });
+ if (errors.length) {
+ const { error, offset } = errors[0];
+ throw new Error(`Failed to parse "${path}" as JSON AST Object. ${(0, jsonc_parser_1.printParseErrorCode)(error)} at location: ${offset}.`);
+ }
+ return content;
+}
+exports.readJsonFile = readJsonFile;