-
Notifications
You must be signed in to change notification settings - Fork 32
Packages
Pawn Packages are similar in concept to the tools in other languages that allow users to distribute code as self-contained "boxes" of code, documentation, tests and other metadata:
- NPM Packages
- Ruby Gems
- Python Packages
- Perl Modules
All these tools make it extremely simple and quick to get code that someone else has written and use it in your own code. This is one thing that has been missing from the Pawn community until now.
At the most basic level, a GitHub repository with a .inc file in it is a Pawn
Package. You could add that repository URL to your own Package Definition's
dependencies
list and it would probably work perfectly.
However, if that repository contained code that required, for example, YSI to
run properly - it would not work perfectly unless you manually included YSI in
your own dependencies
(even if your code did not depend on YSI).
To avoid situations like this, all Pawn repositories on GitHub should include a
Package Definition File (either pawn.json
or
pawn.yaml
depending on your preference) which would declare a list of
dependencies.
Once we, as a community, reach that point - writing a library that required other code would be trivial!
See the Examples page for some good habits to copy for Pawn Packages.