GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - aileria/template2code: Template-based and language-agnostic code generation script

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
generated/Aitor's scripts
generated/Aitor's scripts
 
 
templates/example
templates/example
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
t2c.config.js
t2c.config.js
 
 
t2c.js
t2c.js
 
 

Repository files navigation

MIT License forthebadge

template2code

Template-based and language-agnostic code generation script.

Mainly designed to save development time while writing boilerplate code. Allows to quickly scaffold a custom file structure defined by a template.

Templates are directories which can contain placeholders in file contents, file names and folder names. Once a template is selected, the CLI script will prompt you to enter a value for each different placeholder found in the template, then will generate an output mirroring the template and replacing placeholders with specified values.

Usage

1. Build a template

Simply create a new directory under the templates' directory (./templates by default). Its name will be the name of the template.

Inside the template directory create as many folders and files as you need, adding placeholders in file/directory names or file contents with the following syntax {{placeholderName}} (customization is possible, see Configuration).

2. Generate code from template

Run the script and follow the instructions.

node t2c.js

Example run

Example showing how the example output located in ./generated was obtained.

App Screenshot

Configuration

The script will use all settings specified in t2c.config.js.

These properties can be modified to customize settings like templates directory, output directory or placeholder syntax.

About

Template-based and language-agnostic code generation script

Topics

code-generationdevelopmentdevtoolsnodejsproductivitytemplatetemplate-engine

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.