chiubaka / generator-chiubaka-typescript-package

Yeoman generator for standard Chiubaka Technologies TypeScript packages for libraries and other such things.
1 stars 0 forks source link

Generate a README.md file #37

Closed chiubaka closed 2 years ago

chiubaka commented 2 years ago
chiubaka commented 2 years ago

NPM_TOKEN step is no longer necessary after #47.

chiubaka commented 2 years ago

This is currently in progress, but blocked on a few bugs in my implementation. Specifically, I've implemented two features along the way:

  1. Generators can accept either options or prompt answers. A generator will not prompt for questions already answered by an option.
  2. Subgenerators will inherit options from their parents.

The impact of the second feature is that the ReadmeGenerator should receive answers to its options / questions from the parent NodeModuleGenerator.

Unfortunately, behavior I'm seeing right now is a massive duplication of the question prompts.

chiubaka commented 2 years ago

The problem is that answers don't get propagated down to subgenerators. I wrote a test that had previously convinced me that they do, but it seems that test wasn't faithful.

To solve, I need to:

  1. Prompt before composing child generators to populate answers
  2. Provide answers as the options object supplied to the child.
chiubaka commented 2 years ago

I've got this problem solved, but I don't have a working regression test yet. Working on something that will use jest.spyOn to ensure that prompt is not called multiple times with overlapping options.