Skip to main content

Adding to existing projects

If you already have a repository or project and you want your templates to live inside that project, then you can follow these steps.

The main benefit of having Flayyer inside your project is being able to reuse your current styles and components.

React.js projects#

Install react, react-dom and @flayyer/cli with:

Terminal.app
yarn add react react-dom
yarn add --dev @flayyer/cli

Add the following scripts to your package.json:

package.json
{
"scripts": {
"flayyer:start": "flayyer start",
"flayyer:build": "flayyer build",
"flayyer:deploy": "flayyer deploy"
},
}

Add the following to your .gitignore:

.gitignore
.flayyer-*

Now you can start the development server with:

Terminal.app
yarn run flayyer:start

Be aware of the terminal output when running Flayyer in this mode. You are probably going to be asked to install some extra devDependencies.

Typescript support

To use Typescript instead of plain Javascript go to: Typescript.