Class: Makit::Cli::Generators::Templates::Node::Gitignore
- Inherits:
-
Object
- Object
- Makit::Cli::Generators::Templates::Node::Gitignore
- Defined in:
- lib/makit/cli/generators/templates/node_templates.rb
Overview
Template generator for Node.js project .gitignore files
Generates a .gitignore file with common Node.js artifacts and log files that should not be committed to version control. Includes node_modules/, npm debug logs, and yarn error logs.
Instance Method Summary collapse
-
#initialize(project_name) ⇒ Gitignore
constructor
Initialize a new .gitignore template generator.
-
#render ⇒ String
Render the .gitignore file content.
Constructor Details
#initialize(project_name) ⇒ Gitignore
Initialize a new .gitignore template generator
141 142 143 |
# File 'lib/makit/cli/generators/templates/node_templates.rb', line 141 def initialize(project_name) @project_name = project_name end |
Instance Method Details
#render ⇒ String
Render the .gitignore file content
148 149 150 151 152 153 154 155 |
# File 'lib/makit/cli/generators/templates/node_templates.rb', line 148 def render " node_modules/\n npm-debug.log*\n yarn-debug.log*\n yarn-error.log*\n GITIGNORE\nend\n" |