@shutter/shutterrc
Locate and parse the shutter configuration file, `.shutterrc`. Will start looking for `.shutterrc` in the currently working directory, then traverse its parents and finally try the user's home directory.
Last updated 2 years ago by andywer .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @shutter/shutterrc 
SYNC missed versions from official npm registry.

@shutter/shutterrc NPM Version

Locate and parse the shutter configuration file, .shutterrc. Will start looking for .shutterrc in the currently working directory, then traverse its parents and finally try the user's home directory.

API

import { loadShutterConfig } from '@shutter/shutterrc'

loadShutterConfig(directoryPath: string = process.cwd()): Promise<ShutterConfig>

Locate the .shutterrc file, read and parse it. Start looking in directoryPath.

updateShutterConfig(configFilePath: string, updatedConfig: ShutterConfig): Promise<void>

Write an updated shutter configuration to a .shutterrc file. The targetted .shutterrc may already exist. If not, it will be created.

Pass the whole configuration, not just the entries to update.

getUserConfigPath(): string

Returns the path to the user-specific .shutterrc file.

Sample .shutterrc

authtoken=eyJhbGciO...

Current Tags

  • 0.4.0                                ...           latest (2 years ago)

4 Versions

  • 0.4.0                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (6)
Dev Dependencies (5)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |