- Notifications
You must be signed in to change notification settings - Fork6
Package manager for the Motoko programming language
License
ZenVoich/mops
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Mops is a package manager for the Motoko programming language.
curl -fsSL cli.mops.one/install.sh | sh
or
npm i -g ic-mops
Addmops
as a packtool to yourdfx.json
{"defaults": {"build": {"packtool":"mops sources" } }}
Run this command in the root directory of your project (where isdfx.json
placed)
mops init
Usemops add <package_name>
to install a specific package and save it tomops.toml
mops add base
You can also add packages from GitHub like this
mops add https://github.com/dfinity/motoko-base
For GitHub-packages you can specify branch, tag, or commit hash by adding#<branch/tag/hash>
mops add https://github.com/dfinity/motoko-base#moc-0.9.1
You can also add local packages like this (put source files insidesrc
directory)
mops add ./shared
Usemops install
to install all packages specified inmops.toml
mops install
Now you can import installed packages in your Motoko code
importPackageName"mo:<package_name>";
for example
importItertools"mo:itertools/Iter";
Create new identity to publish packages
dfx identity new mops
Import identity intomops
mops user import -- "$(dfx identity export mops)"
Run this command in your package root and select type "Package"
mops init
Editdescription
andrepository
fields inmops.toml
file.
Write your package code in*.mo
source files in thesrc/
directory.
CreateREADME.md
file with information on how to use your package.
Publish package to the mops registry!
mops publish
Built for theSupernova Hackathon
About
Package manager for the Motoko programming language
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Contributors7
Uh oh!
There was an error while loading.Please reload this page.