Skip to content

Latest commit

 

History

History
138 lines (125 loc) · 2.73 KB

architecture.README.md

File metadata and controls

138 lines (125 loc) · 2.73 KB

Architecture

Summary

There are two main ideas in the architecture:

  • pipeline
  • plugins

The main program is only a pipeline that apply plugins AFTER each stage.

The main plugin runs before any plugins. Plugins should be as independent as possible. Plugins modify the data piped through and can attach plugin specific data or manipulate data however the plugin wants.

The pipeline will find a function called process[Each|All][StageName] in the plugin object to apply to the data.

Stages

  • htmlFiles

    {
      htmlFiles: {
        [filePath]: {
          fileName: [fileName],
          filePath: [filePath],
          fileContent: [fileContent]
        }
      },
      options: { }
    }
  • htmlSnippets

    {
      components: {
        [componentName]: {
          fromPath: [fromPath],
          pathName: [pathName],
          componentName: [componentName],
          htmlSnippet: [htmlSnippet]
        }
      },
      options: { }
    }
  • jsxSnippets

    {
      components: {
        [componentName]: {
          fromPath: [fromPath],
          pathName: [pathName],
          componentName: [componentName],
          htmlSnippet: [htmlSnippet],
          jsxSnippet: [jsxSnippet]
        }
      },
      options: { }
    }
  • declarationSnippets

    {
      components: {
        [componentName]: {
          fromPath: [fromPath],
          pathName: [pathName],
          componentName: [componentName],
          htmlSnippet: [htmlSnippet],
          jsxSnippet: [jsxSnippet],
          declarationSnippet: [declarationSnippet]
        }
      },
      options: { }
    }
  • imports

    {
      components: {
        [componentName]: {
          fromPath: [fromPath],
          pathName: [pathName],
          componentName: [componentName],
          htmlSnippet: [htmlSnippet],
          jsxSnippet: [jsxSnippet],
          declarationSnippet: [declarationSnippet],
          imports: [imports]
        }
      },
      options: { }
    }
  • export

    {
      components: {
        [componentName]: {
          fromPath: [fromPath],
          pathName: [pathName],
          componentName: [componentName],
          htmlSnippet: [htmlSnippet],
          jsxSnippet: [jsxSnippet],
          declarationSnippet: [declarationSnippet],
          imports: [imports],
          export: [export]
        }
      },
      options: { }
    }
  • formattedSnippets

    {
      components: {
        [componentName]: {
          fromPath: [fromPath],
          pathName: [pathName],
          componentName: [componentName],
          htmlSnippet: [htmlSnippet],
          jsxSnippet: [jsxSnippet],
          declarationSnippet: [declarationSnippet],
          imports: [imports],
          export: [export],
          formatedsnippet: [formatedsnippet]
        }
      },
      options: { }
    }