@flayyer/cli
- Repository: https://github.com/flayyer/flayyer-cli
- NPM Package: https://www.npmjs.com/package/@flayyer/cli
This is a Command-Line Interface (CLI) to develop dynamic og:images. Behind the scenes this package starts a development server with Parcel.js and enables developers to create Flayyer Templates using their favorite apps and technologies.
- Yarn
- NPM
It is recommended to install it as a development dependency (devDependencies
):
It is recommended to install it as a development dependency (devDependencies
):
note
This module is included when creating a project with create-flayyer-app
#
flayyer.config.jsThis file is loaded when submitting the bundled file to Flayyer servers through flayyer deploy
.
Basic file structure is:
Here is the expected format of the file using a Typescript Type notation:
#
FLAYYER_KEYnote
Get your API key at: https://flayyer.com/dashboard/_/settings
This is the API key required to authenticate before uploading your project to our cloud.
#
ScriptsEvery script here assumes you have the following package.json
:
#
flayyer startcaution
Please use Google Chrome, Firefox or Opera. Safari is not widely supported.
This command starts a development server using Parcel.js. Then open Flayyer Studio in your browser for a better developer experience.
To run the server at the default host and port http://localhost:7777 just execute:
- Yarn
- NPM
You can change the port using the -p
flag and the host with -H
:
You can change the port using the -p
flag and the host with -H
:
You should get a message like this on your terminal:
Visit Flayyer Studio to preview your template while developing.
#
Caveats- The development server is under heavy development and might have some issues while running.
- If the server crashes: you need to restart it.
- If hot-reloading is not working: Move your components to the same file as your template
#
flayyer buildBefore deploying to production via flayyer deploy, you must run this build command:
- Yarn
- NPM
#
flayyer deployinfo
You must run flayyer build before running this command.
To upload the final bundled templates to our cloud you must have an API Key.
Click here to manage your keys ๐
Set your API key as FLAYYER_KEY
and an environment variables or directly in your flayyer.config.js if you are working on a private repository.
Dotenv files are supported via dotenv
:
- Yarn
- NPM
When you are ready to deploy run:
When you are ready to deploy run:
If everything is correct, you should see an output with your templates' URLs.