You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI: repeatable --plugin <module[@prefix]> flag for config-file-free app mounting #594
Follow-up 1 from #592 (the other follow-up there, pluginDataDir, stays tracked in #592's thread).
Motivation
Since #593 / 0.0.216, jss start -c config.json mounts plugins — but the simple case still requires writing a config file for what is conceptually one argument. A repeatable flag closes that:
It's also the seam servejss needs to stay a pure flag translator: with this flag, servejss --plugin ./chat/plugin.js@/chat ./public forwards verbatim, and jsserve never learns plugin semantics (consistent with its How-it-works contract: JSS owns loading, the wrapper owns the CLI).
Proposed shape
Repeatable: commander collect pattern; each occurrence appends one entry.
Syntax: module[@prefix] — split on the last@ whose remainder starts with /, so scoped packages parse unambiguously (@scope/pkg/plugin.js@/app → module @scope/pkg/plugin.js, prefix /app; bare @scope/pkg/plugin.js → no prefix).
Merging: CLI entries append to config.plugins from the file (both sources usable together), rather than the usual CLI-replaces-file scalar rule — replacing would make -c plus one --plugin silently drop the file's apps.
Scope limits: per-plugin config objects and explicit id stay config-file territory; the flag covers the module + prefix case only. Entries go through the existing loader untouched, so prefix validation, duplicate-id rejection, and fail-loudly-on-import-error all apply as-is.
Activity
feat(cli): repeatable --plugin <module[@Prefix]> flag (#594) (#595)
bump version to 0.0.217