You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@tryghost/settings-path-manager

Package Overview
Dependencies
Maintainers
22
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tryghost/settings-path-manager

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

0.1.9
latest
Source
npmnpm
Version published
Weekly downloads
394
-3.67%
Maintainers
22
Weekly downloads
 
Created
Source

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.

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

Run

  • yarn dev

Test

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

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

FAQs

Package last updated on 22 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts