<< modulepath | Modules manager | nmm_build_help >> |
st = nmm('list') |
nmm('load', module_name) |
l = nmm('autoload', module_name) |
nmm('autoload', module_name, state) |
nmm('install', git_url) |
nmm('uninstall', module_name) |
package_filename = nmm('package', module_name, destination_dir) |
a string: short module's name.
a logical: true will autoload module at startup, false disable autoload for this module.
a string: a git url (http/https protocol).
a string: an existing destination directory where archive will be created.
a struct: list of installed modules.
a logical: current state of autoload.
a string: filename.
nmm is the Nelson Modules Manager.
Source-based distribution packages allows to have optimized packages for your computer and allows to have distributed repositories.
Installed modules are locally built and can require an C/C++.
st = nmm('list') get list of installed modules.
nmm('install', git_url) install a distant module.
About git_url, in this example 'https://github.com/nelson-lang/module_skeleton_basic.git#v1.0.0'
'#v1.0.0' is defined as #<commit-ish>, it allows to clone exactly an commit.
The commit-ish can be a tag (exact version), and an sha1 (exac commit) or an branch name.
Without commit-ish, master branch will be used.
nmm('install', filename_nmz) install an prebuilt external module.
nmm('load', module_name) load an installed module for current session.
l = nmm('autoload', module_name returns current state autoload for module_name.
nmm('autoload', module_name, state) marks an installed modules "marked" as autoload at startup.
By default modules are marked as autoload.
nmm('uninstall', module_name) uninstall an installed module.
nmm('package', module_name, destination_dir) packages an module as a zip file.
Deploy module_skeleton_basic template
if ~ismodule('module_skeleton_basic')
nmm('install', 'https://github.com/nelson-lang/module_skeleton_basic.git#v1.0.0');
macro_sum(3, 4)
nmm('uninstall', 'module_skeleton_basic')
end
Package easily a module
if ~ismodule('module_skeleton_basic')
nmm('install', 'https://github.com/nelson-lang/module_skeleton_basic.git#v1.0.0');
end
package_filename = nmm('package', 'module_skeleton_basic', tempdir())
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET