Ghost/ghost/settings-path-manager
Daniel Lockyer 255eb0726b
Cleaned up package metadata
refs https://github.com/TryGhost/Toolbox/issues/354

- set packages to `private: true`
- removed repository link - these packages won't be published so this
  link won't be seen anywhere
- removed `publishConfig`
2022-07-26 15:08:05 +02:00
..
lib Added getBackupFilePath to settings-path-manager module 2021-09-30 20:14:21 +02:00
test Added getBackupFilePath to settings-path-manager module 2021-09-30 20:14:21 +02:00
.eslintrc.js Added settings-path-manager module 2021-09-30 19:22:09 +02:00
index.js Added settings-path-manager module 2021-09-30 19:22:09 +02:00
LICENSE 2022 2022-01-06 09:52:35 +00:00
package.json Cleaned up package metadata 2022-07-26 15:08:05 +02:00
README.md 2022 2022-01-06 09:52:35 +00:00

Settings Path Manager

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

Install

npm install @tryghost/settings-path-manager --save

or

yarn add @tryghost/settings-path-manager

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'

Develop

This is a mono repository, managed with lerna.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Run

  • yarn dev

Test

  • yarn lint run just eslint
  • yarn test run lint and tests

Copyright & License

Copyright (c) 2013-2022 Ghost Foundation - Released under the MIT license.