Ghost/ghost/settings-path-manager
Daniel Lockyer 85098e07d4 Configured all unit tests to use dot reporter
refs https://ghost.slack.com/archives/C02G9E68C/p1696490748701419

- this configures mocha to use the dot reporter because the default is
  way too verbose in CI
2023-10-05 12:24:24 +02:00
..
lib Added eslint rule for file naming convention 2023-05-09 12:34:34 -04:00
test
.eslintrc.js
index.js Added eslint rule for file naming convention 2023-05-09 12:34:34 -04:00
package.json Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
README.md

Settings Path Manager

A library which helps locating configuration paths in Ghost. For example configs for dynamic routes or redirects.

Usage

Example use in to create routes.yaml configuration files:

const config = require('../shared/config'); // or whatever place the storage folders are configured at

const settingsPathManager = new SettingsPathManager({
    type: 'routes',
    paths: [config.getContentPath('settings')]
});

const filePath = settingsPathManager.getDefaultFilePath();

console.log(config.getContentPath('settings')); // -> '/content/data/'
console.log(filePath); // -> '/content/data/routes.yaml'