1.0.0 • Published 6 years ago

ddlc-snapshot-installs v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

ddlc-snapshot-installs Build Status XO code style TypeScript

About

ddlc-snapshot installations management library.

Save and restore backups of all the important content DDLC (and it's mods) uses.

Useful when you don't want to miss anything from the game... 🔎

Installation

With npm:

$ npm i -S ddlc-snapshot-installs

or with Yarn:

$ yarn add ddlc-snapshot-installs

Usage

Before you can follow the steps below, you have to require/import it:

With TypeScript:

import installStore from 'ddlc-snapshot-installs';

With Node.js JavaScript:

const installStore = require('ddlc-snapshot-installs');

Base Objects

Installation

Object that represents a DDLC installation in the store.

  • installName: Name of the installation. Type: string
  • installPath: Path to the installation. Type: string
  • installConfigPath: Optional path to the custom RenPy's config path. Type: string

StoreOperationResult

Object that represents the result of a store operation.

  • storeOperation: Type of the operation. Possible values: add|remove
  • success: Success flag. Type: boolean
  • msg: Optional message. Type: string

Add DDLC installation

installStore.add(installName: string, installPath: string, installConfigPath?: string): Promise<StoreOperationResult>

Register a new installation in the installation store. This function requires:

  • an installation name, which must be unique among the installation list;
  • the path to the DDLC installation.

Optionally you can specify where to find the RenPy configuration states.

List DDLC installations

installStore.list(): Promise<Installation[]>

Display the list of DDLC installations stored.

Get installation by name

installStore.get(installName: string): Promise<Installation>

Get the Installation object with the specified installname. Promise rejects if the installName is not found in the store.

Check whether installation is in store

installStore.contains(installName: string): Promise<boolean>

Pretty self-explanatory...

Remove a DDLC installation

installStore.remove(installName: string): Promise<StoreOperationResult>

Remove an installation from the store. This function requires:

  • an installation name.