Welcome! You've arrived to the warm and cozy home of the Wing Trusted Library Ecosystem.
This repository hosts the code for Wing libraries (also called "winglibs") that we consider trusted and that meet our community's quality bar.
One of the cool things about trusted libraries is that we take care of building, testing and publishing them for you.
Generated with mkrepo.sh
. To update the list of supported platforms for a winglib, please update the "wing" section in its package.json file.
The code for each library is located in a subdirectory named after the library. For example, the
websockets
library is located under ./websockets
.
Wing libraries are published to npm under the @winglibs
scope, and there's a package.json
file
in the library's directory.
A set of GitHub Workflows are maintained for each library under the .github directory.
These workflows, as well as other artifacts in this repository (such as the table of contents in
this README) are are generated using a tool called mkrepo
, which can be executed using the
./mkrepo.sh
script at the root of this repository. The source code for this tool is can be found
under .mkrepo (and it is written in Wing of course).
It's so damn easy.
Clone this repository:
git clone https://github.com/winglang/winglibs.git
Change to the winglibs
directory:
cd winglibs
Use the fabulous mklib.sh
script to scaffold your library:
./mklib.sh my-awesome-lib
This will create a subdirectory called my-awesome-lib
with some initial source code and a test. It
will also create a github workflow which will take care of building, testing and publishing your
library to npm.
Now do your magic.
When you are ready, submit a pull request to this repository. Someone from the team will review it
and will hopefully provide you with useful feedback and a lot of love, and eventually merge it into
main
, and your library will be live.
If you wish to publish an update to your library, simply submit a new pull request with your update. Once the PR is merged, your new version will be published.
-
✌️ Make sure you use a conventional commit title. (
feat:
for new features,fix:
for bug fix andchore:
for anything else). -
✌️ DON'T FORGET! You will need to manually bump the
version
field of your library based on the semantic version update. In the future we plan to automate this so that bumps will happen automatically.Semantic versioning is a convention for version numbers that is commonly used to indicate the type of update. The version number consists of three components:
MAJOR
.MINOR
.PATCH
:- The
MAJOR
component must be bumped if the update includes a breaking change. - The
MINOR
component must be bumped if the update includes a new feature. - The
PATCH
component must be bumped if the update includes a bug fix.
Before 1.0.0, the
MAJOR
component is always0
, theMINOR
component represents breaking changes and thePATCH
component represents new features and bug fixes. - The
To consume these libraries, users just need to:
npm i @winglibs/my-awesome-lib
And then:
bring my-awesome-lib
See docs.
Please note that it refers to writing libraries that are not published here, so it includes instructions for things that you get here automatically when using the mklib.sh
script to scaffold your library.
To specify the platforms your library supports, you can add a wing.platforms
field to your package.json
:
{
"name": "@winglibs/my-awesome-lib",
"version": "0.0.1",
"wing": {
"platforms": [
"sim",
"tf-aws"
]
}
}
This repository is licensed under the MIT License, unless otherwise specified in a library directory.