FreeAllMedia / stimpak

An easy-to-use system for defining, discovering, and re-using code, text, and workflow patterns
http://stimpak.io
MIT License
8 stars 1 forks source link

config file #31

Closed dcrockwell closed 8 years ago

dcrockwell commented 8 years ago

Allow for a configuration to be read from file if it exists:

.stimpak.json

{
  "answers": {
    "projectName": "My Project"
  }
}

.stimpak.yml

answers:
  projectName: "My Project"

examples/load.js

import Stimpak from "stimpak";

const stimpak = new Stimpak()
  .load(`${__dirname}/stimpak.json`);

// answers were loaded, so any prompts with those names will be skipped.
dcrockwell commented 8 years ago

Maybe this isn't the best idea.

We already have .answers(require(__dirname/stimpak.answers.json))`.

Someone can re-open if they think it's still a good idea.