Class: Makit::Cli::Generators::Templates::Node::Readme
- Inherits:
-
Object
- Object
- Makit::Cli::Generators::Templates::Node::Readme
- Defined in:
- lib/makit/cli/generators/templates/node_templates.rb
Overview
Template generator for Node.js project README.md files
Generates a standard README.md file with project name, description, and common npm commands (install, run, test). Provides documentation structure for Node.js projects.
Instance Method Summary collapse
-
#initialize(project_name) ⇒ Readme
constructor
Initialize a new README.md template generator.
-
#render ⇒ String
Render the README.md markdown content.
Constructor Details
#initialize(project_name) ⇒ Readme
Initialize a new README.md template generator
94 95 96 |
# File 'lib/makit/cli/generators/templates/node_templates.rb', line 94 def initialize(project_name) @project_name = project_name end |
Instance Method Details
#render ⇒ String
Render the README.md markdown content
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/makit/cli/generators/templates/node_templates.rb', line 101 def render " # \#{@project_name}\n\n A Node.js project.\n\n ## Installation\n\n ```bash\n npm install\n ```\n\n ## Running\n\n ```bash\n node index.js\n ```\n\n ## Testing\n\n ```bash\n npm test\n ```\n README\nend\n" |