Skip to content

etabits/node-produce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

produce - WIP

A multi-rule multi-purpose source/target agnostic configurable transformer

Build Status Coverage Status

This module and documentation is still considered work-in-progress. Only no config example is added below for a preview

Usage Examples

As a module

Check produce-example-multihash. This is the current definitive example with concept outline. Example TTY GIF for multihash serve script

Command line use

No Configuration

Install required plugins and it will automatically use them to produce output/serve content

Example: https://github.com/aularon/produce-example-no-conf

Example TTY GIF for no-conf build mode

Micro Configuration

Very similar to No Config, plus you can set per-plugin settings in package.json

Example: https://github.com/aularon/produce-example-micro-conf

Example TTY GIF for no-conf preview mode

Next

Simple conf

less: less | add_header_note(preview) | yuicompressor(dist) > css
pug,jade: pug | add_header_note(preview) > html
js: babel | add_header_note(preview) | closure > js

Advanced conf

{
  rules: [
    {
      source: /\.(pug|jade)$/,
      via: [
        'pug',
        {
          processor: 'add_header_note',
          modes: ['serve']
        },
      ],
      target: 'css'
    }
  ]
}

Terminology

  • Source.read(input)
  • Target.write(output)

CLI

proudce sourceDir targetDir # fs source and fs target
proudce sourceDir # fs source and http target

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published