jackrobertscott / solis-151011

Task running utilities for website development
0 stars 0 forks source link

Solis generate boilerplate code #5

Closed jackrobertscott closed 9 years ago

jackrobertscott commented 9 years ago

A function that generates boilerplate code into a given directory.

Store boilerplate template modules in seperate folders within a templates folder. This templates folder may, in the future, be ignored as templates might be made by third parties and accessed from seperate git repos, etc.

Within a boilerplate module there would be a folder which stores the actual template files as well as a questions.{js,json} file. Solis would open the module, parse the questions in the questions file through inquirer.js (asking the users for config values) and then use the answers to those questions to render the template files. The rendered template files would then be copied to the destination folder.

Example templates folder structure

.
+-- templates
    +-- new-webapp
    |   +-- questions.json
    |   +-- templates
    |       +-- index.html
    |       +-- styles.css
    |       +-- scripts.js
    +-- new-section
        +-- questions.json
        +-- templates
            +-- section.html
jackrobertscott commented 9 years ago

allow template files to be parsed through lodash's templating function.