Note: FAB v1 is in public pre-release. Things will change, but any feedback you can give is greatly appreciated.
yarn global add @fab/clinpm install -g @fab/cli
Note: in the future, you will not need to do this, instead you can use
yarn dlx fabto do everything without global installation. But not yet.
You can configure a repository to build a FAB by running
fab init in the repo:
The following frameworks are supported:
Anything else will be treated as a "static" build i.e. a project with no server-side component. It'll look for a command like
npm run build to generate a directory like
public, which should cover everything from Angular to Vue to Gatsby. But as always, leave an issue if something you think should happen doesn't happen.
fab init will add
fab:build scripts to your
package.json, but both of them call
fab build under the hood.
# runs npm run build, then builds the FAByarn build:fabnpm run build:fab# alias for fab build, belowyarn fab:buildnpm run fab:build# generates a FAB according to your fab.config.json5fab build
If it works, you should get a
fab.zip file output.
fab serve fab.zipfab serve fab.zip --port=3001
Runs your FAB in a local NodeJS Express server.
Will prompt you for your Cloudflare workers & Amazon S3 info and deploy your FAB!