Skip to content

Flagship Code Configuration

The primary objective of flagship-code.config.ts is to provide developers with the freedom to scaffold their configurations according to their preferences. We refrain from making assumptions regarding how developers wish to structure their apps, aiming instead to empower them with flexibility in configuration setup…

…except for the location of the flagship-code.config.ts 😉.

Create the flagship-code.config.ts in the root of your project directory.

Terminal window
touch flagship-code.config.ts

Here is an illustrative representation of the configuration structure, including sample paths and plugins for contextual understanding. Please feel free to adjust the paths and plugins according to your project’s requirements.

flagship-code.config.ts
import { defineConfig } from "@brandingbrand/code-cli-kit";
export default defineConfig({
buildPath: "./coderc/build",
envPath: "./coderc/env",
pluginPath: "./coderc/plugins",
preset: "@brandingbrand/code-preset-react-native",
plugins: [
"@brandingbrand/code-plugin-native-navigation",
"@brandingbrand/code-plugin-splash-screen",
"@brandingbrand/code-plugin-app-icon",
],
});

You can pass the following options to the flagship-code configuration.

type: string

required

The relative path from the root of your project to the location to where your build configurations are defined.

type: string

required

The relative path from the root of your project to the location where your environment configurations are defined.

type: string

required

The relative path from the root of your project to the location where your local plugin packages are defined.

type: string

required

The package name of the preset that Flagship Code will utilize - this corresponds to the package name listed under devDependencies in your package.json.

It is highly recommended to use the @brandingbrand/code-preset-react-native preset for React Native applications, as it provides a comprehensive set of default configurations and plugins tailored for React Native development.

type: string

required

A prioritized list of the plugins that Flagship Code will invoke - these correspond to the package names listed under devDependencies in your package.json.