Add Plugins to your project
Adding a Plugin with create-gs-project
To integrate a plugin into your project, you can utilize the npx create-gs-project@latest add
command. This command should be executed within either the client
or server
directory of your project, depending on where you intend to incorporate the plugin.
Checking if the Project is a Framework Project
Before proceeding with adding a plugin, the CLI will assess whether your project is a framework project. If it is, a list of all installed and available plugins will be displayed, allowing you to select the plugin you wish to integrate.
npx create-gs-project@latest add
Example output:
┌─────────┬──────────────┬─────────┐
│ (index) │ Plugin Name │ Version │
├─────────┼──────────────┼─────────┤
│ 0 │ 'base-fe' │ '1.0.0' │
└─────────┴──────────────┴─────────┘
Available Plugins
┌─────────┬──────────────┬───────────────────────────────────────────────┐
│ (index) │ Plugin name │ Command to install │
├─────────┼──────────────┼───────────────────────────────────────────────┤
│ 0 │ 'graphql-fe' │ 'npx create-gs-project@latest add graphql-fe' │
└─────────┴──────────────┴───────────────────────────────────────────────┘
Then, run the command npx create-gs-project@latest add graphql-fe
to install graphql-fe
inside. It will merge the project with graphql plugin. If you want to see the functionality that graphql-fe
adds, you can view the docs for graphql-fe
.