4.0.0 • Published 6 years ago

@sanvyx/dependent_pages v4.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

getDependentPages

Receives absolute path to stateless react component and absolute path to folder with top level react pages. Returns a promise, which resolves to an array of pages.

Arguments

path - absolute path to stateless react component config - should include next fields:

  • JSX_ROOT - absolute path to folder with root react pages
  • DIST - absolute path to distribution folder

Returns

Returns a promise, which resolves to an array of pages. Each page contains next props:

  • module.exports
  • body - jsx rendered to html
  • data - complete html page, assembled from template
  • path - absolute path to page
  • to - absolute distribution path for page