-
Notifications
You must be signed in to change notification settings - Fork 34
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.
However, if that repository contained code that required, for example, YSI to run properly - it would not work perfectly unless you manually included YSI - even if your code did not depend on YSI.
The other problem here is you don't know what other includes are required by a released piece of code without either:
- reading the code
- reading the documentation
And even then the author could forget or accidentally build their library against an ancient, outdated version of the include it requires.
To avoid situations like this, all Pawn repositories on GitHub should include a Package Definition File which would declare a list of "dependencies".
See the Examples page for some good habits to copy for Pawn Packages.