replaced json -> hjson loader

This commit is contained in:
Wyatt Johnson
2018-02-15 10:47:36 -07:00
parent 376ffd8486
commit 36e855237f
4 changed files with 19 additions and 5 deletions
+2 -1
View File
@@ -113,13 +113,14 @@
"hammerjs": "^2.0.8",
"helmet": "3.8.2",
"history": "^3.0.0",
"hjson": "^3.1.1",
"hjson-loader": "^1.0.0",
"immutability-helper": "^2.2.0",
"imports-loader": "^0.7.1",
"inquirer": "^3.2.2",
"inquirer-autocomplete-prompt": "^0.12.1",
"ioredis": "3.1.4",
"joi": "^10.6.0",
"json-loader": "^0.5.7",
"jsonwebtoken": "^7.4.3",
"jwt-decode": "^2.2.0",
"keymaster": "^1.6.2",
+4 -1
View File
@@ -4,6 +4,7 @@ const resolve = require('resolve');
const debug = require('debug')('talk:plugins');
const Joi = require('joi');
const amp = require('app-module-path');
const hjson = require('hjson');
const pkg = require('./package.json');
const PLUGINS_JSON = process.env.TALK_PLUGINS_JSON;
@@ -33,7 +34,9 @@ try {
pluginsPath = defaultPlugins;
}
plugins = require(pluginsPath);
// Load/parse the plugin content using hjson.
const pluginContent = fs.readFileSync(pluginsPath, 'utf8');
plugins = hjson.parse(pluginContent);
} catch (err) {
if (err.code === 'ENOENT') {
console.error(
+1 -1
View File
@@ -74,7 +74,7 @@ const config = {
},
},
{
loader: 'json-loader',
loader: 'hjson-loader',
test: /\.(json|yml)$/,
exclude: /node_modules/,
},
+12 -2
View File
@@ -4022,6 +4022,16 @@ history@^3.0.0:
query-string "^4.2.2"
warning "^3.0.0"
hjson-loader@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/hjson-loader/-/hjson-loader-1.0.0.tgz#d6547d77eebbfc8ab9df45c1db90c6c061cc88fc"
dependencies:
loader-utils "^0.2.12"
hjson@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/hjson/-/hjson-3.1.1.tgz#eaab95eebc6c0c749442219a817d9b4ff0070dd2"
hmac-drbg@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
@@ -5076,7 +5086,7 @@ jsmin@1.x:
version "1.0.1"
resolved "https://registry.yarnpkg.com/jsmin/-/jsmin-1.0.1.tgz#e7bd0dcd6496c3bf4863235bf461a3d98aa3b98c"
json-loader@^0.5.4, json-loader@^0.5.7:
json-loader@^0.5.4:
version "0.5.7"
resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d"
@@ -5327,7 +5337,7 @@ loader-runner@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"
loader-utils@^0.2.15:
loader-utils@^0.2.12, loader-utils@^0.2.15:
version "0.2.17"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348"
dependencies: