Plexiform
v1.3.2
In this document |
---|
Introduction |
Not a module |
Getting started |
Contribute |
Version history |
Introduction
Plexiform is a rudimentary code generator.
It doesn't know any language, nor does it know how to reverse-engineer anything. It's really just a simple formalisation of JavaScript template literals, to expose a basic templating system.
But that's still incredibly useful, as it takes the effort and risk out of any repetitious task.
Perfect the code elsewhere, then use this to churn out more code than you could bear to hand-crank!
Not a module
Please note that this is not a Node module, it is a Node script for running in the shell.
I apologise if my npm
etiquette is lacking, please forgive a first-timer :)
Getting started
npm install -g plexiform
- Define a JSON config file to represent whatever it is you are building. No special format required - but your templates will be entirely driven from this.
- Turn your perfect code files into templates.
- Write a build script which applies your templates to your config - e.g. iterates over config collections and saves the output.
- Generate a plexiformconfig.json with
plexiform --init
and edit it accordingly. - Build from the plexiformconfig simply by invoking
plexiform
See the included boilerplate example to get you started
Contribute
- Please use this, and improve it.
- Feel free to write a tutorial.
- Contact me raith AT raith.co.uk
- website coming soon.
Version history
Date | Version | Author | Details |
---|
2017-08-03 | v0.0.0 | Raith | Initiated |
2017-08-04 | v0.0.1 | Raith | Named and stabilised |
2017-08-24 | v0.1.1 | Raith | Updates |
2017-08-28 | v1.0.0 | Raith | Published to npm |
2017-08-28 | v1.1.0 | Raith | Fixed paths so can run as 'plexiform' bin in shell |
2017-08-28 | v1.1.1 | Raith | Removed a couple of non-boilerplate configs |
2017-09-03 | v1.2.0 | Raith | Can now --init and build from a config file |
2017-09-03 | v1.2.1 | Raith | Bug fix |
2017-09-03 | v1.3.0 | Raith | Utilises process-argv and changed to explicit command line arguments rather than positional parameters |
2017-09-03 | v1.3.1 | Raith | No more assumption about file extensions. Now need to specify them for build and config |
2017-09-08 | v1.3.2 | Raith | Refactor base config and utils into own files |