Skip to content

Instantly share code, notes, and snippets.

@ForbesLindesay
Created April 10, 2015 20:51
Show Gist options
  • Select an option

  • Save ForbesLindesay/0533aebe4eb3d740510d to your computer and use it in GitHub Desktop.

Select an option

Save ForbesLindesay/0533aebe4eb3d740510d to your computer and use it in GitHub Desktop.

Jade Pipeline

Options:

  • resolve(filename, source) => filename
  • read(filename) => string

Steps:

  1. pre-lex
  2. lex
  3. post-lex
  4. pre-parse
  5. parse - this should produce a special node type of {type: 'file-reference', path: './foo.jade'} that the loader recognises and populates
  6. post-parse
  7. pre-load
  8. load - Load takes a pipeline for handling strings, as well as the options in order to combine everything into one single object.
  9. post-load
  10. pre-link
  11. link
  12. post-link - this is when default filters are applied
  13. pre-gen - this is a good time to verify that all the JavaScript is valid. i.e. validate expressions etc.
  14. gen
  15. post-gen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment