0.0.3 • Published 6 years ago
lamedal1 v0.0.3
Lamedal1
JavaScript templates - with focus on easy setup and use
Purpose
When working with JavaScript I found myself copy and paste boiler-plate code on a continued basis. This module assist you in easily defining and using templates from a central repository.
Usage:
- To use templates:
- clone: https://github.com/perezLamed/Lamedal1/
node ll -h
// show the helpnode ll
// show all templatesnode ll return
// show all templates with value 'return' in the template namenode ll -r
// show all require templatesnode ll -r express
// show require template for expressnode ll -e
// show express templates
To load most used modules (lodash / express / axios / commander etc.):
npm i lamedal1 -s
About
- This module helps to easily use custom templates within your JavaScript files.
- Templates are stored in the templates folder. To add a new template - just add a new js file.
- Templates can have 1 parameter that is defined by a starting $ and ending $:
- Sample: $Function_name$ -> will generate question: "Function name? "
- And will replace all occurances with the entered value.
- When there are more than one result - all options will be displayed and a selection can be made.
- Once you have chosed a template -> the template detailed will be displayed to the console and coppied to the clipboard.
If you do not like the defined templates -> just change them in the way you want to use them.
Template folder structure
- templates
- templates/express
- templates/lib
- templates/promise
- templates/require
MIT license.