Skip to content

An NX middleware, responsibe for handling internal references.

License

Notifications You must be signed in to change notification settings

nx-js/ref-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The ref middleware

The ref middleware is responsible for handling internal references.

  • name: ref
  • middleware dependencies: attributes
  • all middleware dependencies: observe, attributes
  • type: component or content middleware
  • ignores: text nodes
  • docs

Installation

npm install @nx-js/ref-middleware

Usage

const component = require('@nx-js/core')
const observe = require('@nx-js/observe-middleware')
const attributes = require('@nx-js/attributes-middleware')
const ref = require('@nx-js/ref-middleware')

component()
  .useOnContent(observe)
  .useOnContent(attributes)
  .useOnContent(ref)
  .register('nav-comp')
<nav-comp>
  <a iref="profile">Profile</a>
  <a iref="settings">Settings</a>
</nav-comp>

About

An NX middleware, responsibe for handling internal references.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published