Widdershin/markdown-doctest

Add markdown-doctest --init

Opened this issue · 1 comments

It would be nice to have a command that creates a nice default config, perhaps with comments explain what things do, a la Rails.

This could be interactive, and I could imagine it running markdown-doctest, then helping you set up any imports or globals required.

For the initial version, we should make a file in the current directory called .markdown-doctest-setup.js, with the following contents:

const package = require('.');

module.exports = {
  require: {
     <packageName>: package
  },

  
  globals: {
    <packageName>: package 
  } 
}

Where <packageName> is read from the package.json name field.