banana
latest
  • Getting started with Banana
  • Writing Your Own Banana Generator
    • Writing Your Own Generator
    • Generator Runtime Context
    • Asynchronous tasks
    • Interacting With The User
    • Composability
    • Managing Dependencies
    • Working With The File System
    • Managing Configuration
    • Testing Generators
    • Debugging Generators
    • Integrating Banana
  • Let’s Scaffold a Web App
  • Contributing to the Banana Project
banana
  • Docs »
  • Writing Your Own Banana Generator
  • Edit on GitHub

Writing Your Own Banana GeneratorΒΆ

  • Writing Your Own Generator
    • Organizing your generators
      • Setting up as a node module
      • Folder tree
    • Extending generator
      • Overwriting the constructor
      • Adding your own functionality
    • Running the generator
      • Finding the project root
    • Where to go from here?
  • Generator Runtime Context
    • Prototype methods as actions
      • Helper and private methods
    • The run loop
  • Asynchronous tasks
  • Interacting With The User
    • User interactions
      • Prompts
        • Remembering user preferences
      • Arguments
      • Options
    • Outputting Information
  • Composability
    • generator.composeWith()
      • API
      • execution example
    • dependencies or peerDependencies
  • Managing Dependencies
    • pip
    • Using other tools
  • Working With The File System
    • Location contexts and paths
      • Destination context
      • Template context
    • An “in memory” file system
    • File utilities
      • Example: Copying a template file
    • Transform output files through streams
    • Tip: Update existing file’s content
  • Managing Configuration
    • Methods
      • generator.config.save()
      • generator.config.set()
      • generator.config.get()
      • generator.config.getAll()
      • generator.config.delete()
      • generator.config.defaults()
    • .ba-rc.json structure
  • Testing Generators
    • Organizing your tests
    • Test helpers
    • Assertions helpers
      • Assert files exists
      • Assert a file content
  • Debugging Generators
  • Integrating Banana
    • The basics
    • Using banana
      • A simple usage example
      • Find installed generators
      • Get data about registered generator
    • Providing a custom User Interface (UI)
      • Adapter#prompt()
      • Adapter#diff()
      • Adapter#log()
    • Example implementations
Next Previous

© Copyright 2016, 2017, Fink Labs GmbH. Revision bc416b5a.

Built with Sphinx using a theme provided by Read the Docs.