Skip to content

z-shell/any-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo โฎ ZI โฏ Special Package - Any Node

Package source: Source Tarball Binary Git Node Gem
Status: โŒ โŒ โœ”๏ธ (default) โŒ โŒ


The any-node package

This package is special โ€“ it is designed for easy installing of any Node modules inside the plugin directory, exposing their binaries via shims (i.e.: forwarder scripts) created automatically by Bin-Gem-Node annex.

The Node module(s) to install are specified by the param'MOD โ†’ {module1}; MOD2 โ†’ {module2}; โ€ฆ' ice. The name of the plugin will be {module1}, unless id-as'' ice will be provided, or the IDAS param will be set (i.e.: param'IDAS โ†’ my-plugin; MOD โ†’ โ€ฆ').

A few example invocations:

# Install `coffee-script' module and call the plugin with the same name
zi pack param='MOD โ†’ coffee-script' for any-node
# Install `remark' Markdown processor and call the plugin: remark
zi id-as=remark pack param='MOD โ†’ remark-man; MOD2 โ†’ remark-cli' for any-node
# Install `pen' Markdown previewer and call the plugin: my-pen
zi pack param='IDAS โ†’ my-pen; MOD โ†’ pen' for any-node

Default profile

The only profile that does all the magic. It relies on the %PARAM% keywords, which are substituted with the value from the ice param'PARAM โ†’ value; โ€ฆ'.

The ZI command executed will be equivalent to:

zi lucid id-as="${${:-%IDAS%}:-%MOD%}" as=null \
  node="%MOD%;%MOD2%;%MOD3%;%MOD4%;%MOD5%;%MOD6%;%MOD7%;%OTHER%" \
  sbin="n:node_modules/.bin/*" for \
    z-shell/null

This repository compatible with ZI

The ZI package that uses the zsh-string-lib to automatically:

  • get the plugin's Git repository OR release-package URL,
  • get the list of the recommended ices for the plugin,
    • there can be multiple lists of ices,
    • the ice lists are stored in profiles; there's at least one profile, default,
    • the ices can be selectively overridden.