3.5.1 • Published 3 years ago

plexiform v3.5.1

Weekly downloads
2
License
ISC
Repository
-
Last release
3 years ago

Plexiform

v3.5.1

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!

Install Globally, not Locally

Please note that this is not a Node module, it is a command line tool.

Therefore it should be installed globally, not locally.

Getting started

  • npm install -g plexiform
  • Define a JSON specification file to represent whatever it is you are building. No special format required - but your templates will be entirely driven from this.
  • Plexiform now has a built-in partial MarkDown parser. Define an MD specification file and provide a process method to turn it into your config object.
  • 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 build

See the included boilerplate example to get you started

Specification processing

The simplest specification file is in JSON format, and is directly 'required' in and processed by the build script.

But you can use a specification written in any format, as long as your build script also offers a process method to turn it into a suitable object.

If you wish to express your specification in markdown then a further feature is built-in...

MdDom

To make your specifications neater, plexiform offers the proprietary MdDom markdown parser.

If your specification file has the ".md" extension then it will be pre-processed into a reasonably usefully deconstructed object model. It is that which is then passed in to your build script's process method.

Markdown specifications are recommended as they are both readable and freely parsed.

Gallery

An online gallery to host your specification files and make them centrally available. With versioning.

plexiform gallery new | save | secret | publish
plexiform gallery list | query | fetch

And the back-end was generated by plexiform-build-api, of course :)

Contribute

  • Please use this, and improve it.
  • Feel free to write a tutorial.
  • Contact me raith AT raith.co.uk
  • website coming soon.

3.5.1

3 years ago

3.5.0

6 years ago

3.4.1

6 years ago

3.4.0

6 years ago

3.3.3

6 years ago

3.3.2

6 years ago

3.3.1

6 years ago

3.3.0

6 years ago

3.2.0

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.0

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.1

6 years ago

2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.5.0

7 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago