fastn
: Package ManagerFASTN.ftd
file in any folder. This marks a folder as fastn
package:FASTN.ftd
marks a folder as fastn
package-- import: fastn -- fastn.package: fastn.io download-base-url: https://raw.githubusercontent.com/fastn-stack/fastn.io/main
fastn.io
. Packages in fastn
are named after the domain where they would be published. Every FASTN package is a website.fastn
support package dependencies. To add a dependency, simply add this to the FASTN.ftd
file:-- import: fastn -- fastn.package: fastn.io download-base-url: https://raw.githubusercontent.com/fastn-stack/fastn.io/main -- fastn.dependency: fifthtry.github.io/doc-site as ds
Here fastn.io
has a dependency on fifthtry.github.io/doc-site
.
ds
, so FTD files can write -- import: ds
instead of having to use the full path, e.g. -- import: fifthtry.github.io/doc-site
.Unlike other package managers like pypi, npm and crates, there is no central package repository in fastn
. Since every fastn
package is a website, that website acts as the package repository.
What this means is when fastn
sees fifthtry.github.io/doc-site
as a dependency, it fetches the content of fifthtry.github.io/doc-site/FASTN.ftd
file which acts as the meta data for the package, and the meta data includes the URL from where the package contents can be downloaded.
In our examples we use Github’s raw content to fetch the required files from module. fastn
appends the required file name after the value of download-base-url
. Let’s suppose if the dependency import requires fetching the index.ftd
module of fifthtry.github.io/doc-site
package and fifthtry.github.io/doc-site/FASTN.ftd
contains https://raw.githubusercontent.com/fifthtry/doc-site/main
as the value for download-base-url
, then fastn
tries to fetch it using https://raw.githubusercontent.com/fifthtry/doc-site/main/index.ftd
http request.
Github
, you can store the entire package in some other location and send the prefix of the url from which the modules can be served.fastn
!fastn
? Please consider giving us a star ⭐️ on GitHub to show your support!Have a question or need help?
Visit our GitHub Q&A discussion to get answers and subscribe to it to stay tuned.
Join our Discord channel and share your thoughts, suggestion, question etc.
Connect with our community!We welcome you to join our Discord community today.
We are trying to create the language for human beings and we do not believe it would be possible without your support. We would love to hear from you.