Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@tobiastengler/create-relay-app
Advanced tools
Easy configuration of Relay for existing projects
Easy configuration of Relay.js for existing projects
Setting up Relay can be quite time consuming. The goal of this project is to automate all of the manual setup steps involved, to give you a fast and consistent configuration experience across the most popular React toolchains.
create-relay-app
supports:
Once you have scaffolded a project using your preferred toolchain of choice, simply execute the @tobiastengler/create-relay-app
script in the directory of your project:
npx @tobiastengler/create-relay-app@experimental
Note: We are working on getting the
create-relay-app
name!
This will prompt you for a bunch of questions around your project setup. If you do not want to specify these options interactively, you can also specify them through the CLI arguments. Passing -y
will infer all settings based on your project.
npx @tobiastengler/create-relay-app [options]
Skips any prompts and chooses default values for options that weren't supplied as CLI arguments.
The toolchain, e.g. bundler and configuration, your project was setup with.
Possible values
Example
--toolchain vite
If specified, we assume your project is built with Typescript.
Specifies the location of the GraphQL schema file inside of your project directory.
Possible values
A path relative to the root directory of your project and ending in the .graphql
extension.
Example
--schema-file ./src/schema.graphql
Specifies the source directory of your project, where the Relay compiler will be run on.
Possible values
A relative path to a directory inside the root directory of your project.
Example
--src ./src
Specifies a directory, where all artifacts generated by the Relay compiler will be placed.
Possible values
A relative path to a directory inside the root directory of your project.
Example
--artifact-directory ./src/__generated__
Specify the Node.js package manager to use when packages need to be installed.
Possible values
Example
--package-manager yarn
If specified, the script will not exit, if it's run in a directory with un-commited Git changes.
Displays the current version of the script.
Displays information about all of the available options.
If certain options are not specified as CLI arguments, we try to infer most of them from the directory you ran the script from.
If the next
package is installed, we assume it's a Next.js project, unless specified otherwise.
If the vite
package is installed, we assume it's a Vite.js project, unless specified otherwise.
Otherwise, we assume it's a Create React App project, unless specified otherwise.
If the typescript
package is installed or there is a tsconfig.json
file in the root directory of your project, we assume you are using Typescript, unless specified otherwise.
If you run the script using yarn
or pnpm
, we use them as the default.
If we can't determine which package manger has run the script, we choose:
yarn
, if yarn
is installed and a yarn.lock
file exists at the root of the project.pnpm
, if pnpm
is installed and a pnpm-lock.yml
file exists at the root of the project.npm
in all other cases.If the toolchain is next
, ./
, otherwise ./src
, unless specified otherwise.
If the toolchain is next
, ./src/schema.graphql
, otherwise the value of --src joined with schema.graphql
, unless specified otherwise.
If the toolchain is next
, ./__generated__
, otherwise it's not specified, unless specified otherwise.
false
, unless specified.
false
, unless specified.
FAQs
Easy configuration of Relay for existing projects
The npm package @tobiastengler/create-relay-app receives a total of 24 weekly downloads. As such, @tobiastengler/create-relay-app popularity was classified as not popular.
We found that @tobiastengler/create-relay-app demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.