Remix Forge - A VS Code extension for Remix.run applications that super charges your development with a ever-growing set of functionalities.
Right click the line where you want to insert a snippet and click the corresponding command you want to run. This will insert the snippet in your current editor at the line you right clicked. (eg. insert loader => inserts loader into the file)
Right click your package.json
and initialize all the setup required for shadcn/ui tailored to Remix instead of Next.js. This will add the following to your project:
@/
alias to your tsconfig.jsonAfter that right click your app
folder and add the shadcn/ui components to your application, just specify where you want to store them and you're good to go. The extension will generate the components for you and add them to your app/components/ui
folder by default, or the location specified by you and remember it.
package.json
file and add eslint and prettier to your project configured with remix eslintRight click your .ts or .tsx file and click Generate tests and it will generate a test file for you with all the exports imported and ready to be tested. This is useful for when you want to test your routes or any other file that you want to test.
If you do not colocate your test files the extension will try to find it in your workspace depending on your search settings. See the Extension Settings section on how you can customize your search.
If you already have an existing file it will add all the exports that you didn't import into the file for you (eg. if you already tested your loader and component and you add an action it will only add the action import and the action test for you)
This works for any .ts and .tsx file and is not specific to remix routes. You can use this for any file that you want to test.
You can now initialize Prisma in your Remix app with a single click. You can do this by right-clicking your app
folder and selecting Initialize Prisma
and it will be initialized for you. You choose your database and it will be configured for you. Also adds package.json
commands for running migrations, seeding the database, generating the client and running prisma studio.
You can now update your Remix to a newer version with a single click. You can do this by right-clicking your package.json
file and selecting Update Remix
and it will be updated for you. You can update to the latest version or specify a version you want to update to.
Defaults to the latest one. This uses npx upgrade-remix
built and maintained by the Remix team. Github repo here
You can now generate progressively enhanced form routes with a single click. You can either generate progressive forms with:
remix-hook-form
- React-hook-form wrapper for Remix.run applicationsConform
- Progressively enhanced form generation libraryClick on the routes
folder or anywhere inside of it and select Generate Remix Form Route
and it will be generated for you.
You can now generate the whole authentication scaffolding for Remix applications with a single click. This includes:
auth0
facebook
github
google
microsoft
discord
twitter
oauth2
form
(email/password)Right click
the app
folder and select Generate Authentication Workflow
and select the authentication method(s) you want to use.
After that fill the required secrets inside of the .env
file and you are good to go.
You can now add authentication to your loaders and actions with a click.
Click
the Add authentication
above a loader or action and it will auto generate the authentication using remix-auth.
This is configurable and you can change the import statement to reflect your authenticator location. See the Extension Settings section on how you can customize your output
You can now open up your routes in the browser from the route file itself. This is useful for when you want to test out your routes without having to go to the browser and type in the url or navigate to it.
Each route file with the default export will have a button(s) above the default export that will open up the route in the browser by clicking it.
This is configurable and you can change the url generator function and the paths that you want to generate urls for. See the Extension Settings section on how you can customize your output
Generates every possible export from a route file for Remix.run applications. You can do this by right-clicking your routes folder and selecting convert to v2 convention. Including:
dependencies
loader function
links function
ErrorBoundary component
default Component
shouldRevalidate function
meta function
action function
headers function
handle function
Tip: This is highly configurable per workspace. See the Extension Settings section on how you can customize your output
Converts the v1 routing convention to the v2 routing convention. This command will try to convert your routes from v1 to v2 and if anything goes wrong it will restore your routes to initial state. Just in case PLEASE make sure you have a backup in case something unexpected happens or you find a bug. In case of a bug feel free to submit an issue on our Github repository.
Barrelize your folders with a click. This will generate a barrel file for the selected folder and will export all the files inside of it. This will be done recursively for all the subfolders as well.
This is useful for when you want to import a lot of imports from a directory and you don't want to import each file individually.
Tip: See the Extension Settings section on how you can customize your output
Here is an example video of the basic usage:
Here is an example video of the basic usage:
Here is an example video of the basic usage:
Here is an example video of the basic usage:
Here is an example video of the basic usage:
Here is an example video of the basic usage:
This extension contributes the following configuration settings:
remix-forge.preselected
: Array of preselected options after clicking the Generate Remix route (default is []
).remix-forge.orderOfGeneration
: Allows you to change the order of generation, eg: ["loader", "action"] (default is []
).remix-forge.loader
: Allows you to change the output for the loader segment of the code (default is ''
).remix-forge.action
: Allows you to change the output for the action segment of the code (default is ''
).remix-forge.meta
: Allows you to change the output for the meta segment of the code (default is ''
).remix-forge.handle
: Allows you to change the output for the handle segment of the code (default is ''
).remix-forge.component
: Allows you to change the output for the component segment of the code (default is ''
).remix-forge.links
: Allows you to change the output for the links segment of the code (default is ''
).remix-forge.errorBoundary
: Allows you to change the output for the ErrorBoundary segment of the code (default is ''
).remix-forge.revalidate
: Allows you to change the output for the revalidate segment of the code (default is ''
).remix-forge.headers
: Allows you to change the output for the headers segment of the code (default is ''
).remix-forge.runtimeDependency
: Allows you to change the output for the runtime dependencies (default is ''
).remix-forge.urlGenerator
: Allows you to pass in a custom url generator function for the relative part of the url (default is ''
).remix-forge.urlGeneratorPaths
: Allows you to specify multiple url paths to generate urls for (eg. staging, production, local...) (default is [{ title: "Local", url: "http://localhost:3000" }]
).remix-forge.importAuthFrom
- Change the import statement for the Add authentication command (default is '', this will set it to "~/services/auth.server"
).remix-forge.barrelizeRemoveExtensions
- When using the Barrelize command removes the following extensions from the generated barrel file (default is ['.ts', '.tsx', '.js', '.jsx'] => export * from "./Component(removes the .tsx)
).remix-forge.barrelizeIndexExtension
- Set the generated index file extension (default is 'ts' => index.ts
).remix-forge.barrelizeIgnoreFiles
- Ignores the files that include any of the provided strings (default is ['index', 'test', 'stories]
).remix-forge.formHandler
- Choose between remix-hook-form or conform for your forms (default is remix-hook-form
).remix-forge.urlDebug
- Allows you to debug your url generator function (default is false
).remix-forge.searchStrategy
- Allows you to configure how to search for your test files (enum of three values one-up
- searches one directory above and all subdirectories, sub
- searches current directory and all subdirectories, all
- searches the whole project) - default is one-up
.remix-forge.componentFolder
- Allows you to specify the folder where your shadcn/ui components are located (default is 'app/components/ui'
).remix-forge.customActionImports
- Allows you to specify custom imports for your actions when generating route filesremix-forge.customLoaderImports
- Allows you to specify custom imports for your loaders when generating route filesremix-forge.formRouteTemplate
- Allows you to specify a custom template for your form route filesremix-forge.latestRemixNotification
- Allows you to disable the notification that shows up when a new version of Remix is available (default is true
).clientLoader
generatorclientAction
generatorMonorepo support
remix-forge.latestRemixNotification
- Allows you to disable the notification that shows up when a new version of Remix is available (default is true
).remix-forge.componentFolder
- Allows you to specify the folder where your shadcn/ui components are located (default is 'app/components/ui'
).
remix-forge.customActionImports
- Allows you to specify custom imports for your actions when generating route files
remix-forge.customLoaderImports
- Allows you to specify custom imports for your loaders when generating route files
remix-forge.formRouteTemplate
- Allows you to specify a custom template for your form route files
Changed the auth flow generation to output the AuthStrategies object into a separate file so it can be imported in both server/client bundles
remix-forge.searchStrategy
- Allows you to configure how to search for your test filesremix-forge.urlDebug
- Allows you to debug your url generator function (default is false
).remix-forge.formHandler
- Choose between remix-hook-form or conform for your forms (default is remix-hook-form
).importAuthFrom
configuration option addedbarrelizeRemoveExtensions
configuration option addedbarrelizeIndexExtension
configuration option addedbarrelizeIgnoreFiles
configuration option addedurlGenerator
config option that allows you to pass in a custom function to generate your urlsurlGeneratorPaths
config option that allows you to specify multiple url paths to generate urls for (eg. staging, production, local...)Readme update
Readme update
Initial release of Remix Forge