1.0.2 • Published 6 years ago

shuri v1.0.2

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

Shuri

Tools for building awesome tools

Install

yarn add shuri

Usage

const shuri = require('shuri');

const configName = '.shurirc'; // Matches ".shurirc", ".shurirc.json", ".shurirc.yaml", etc.
const pkgField = 'shuri'; // Matches `package.json#shuri`
const defaultConfig = { /* ... */ };

async function main() {
  let cwd = process.cwd();
  let configFile = await shuri.findConfig(cwd, { configName, pkgField });
  let config;

  if (configFile !== null) {
    config = await shuri.loadConfig(configFile, { pkgField });
  } else {
    config = defaultConfig;
  }

  // configFile == '/path/to/.shurirc.json'
  // config == { doStuff: true }
}