open-index/open-npm huggingface dataset:
npm package: @remix-routes/core
Description: Make remix file-system routing convention easy to customize.
Latest version: 0.2.0

# Remix routes

Make remix file-system routing convention easy to customize.

## Installation

```bash
yarn add -D @remix-routes/core
```

## Create your custom file-system convention

Use `defineRemixRoutes` and define your own convention.

```ts
import { defineRemixRoutes, DefineRoutesFunction, RouteManifest } from '@remix-routes/core';

module.exports = {
  ignoredRouteFiles: ['**/*'],
  routes: async (defineRoutes) => {
    return defineRemixRoutes(appDir, routesDir, defineRoutes, (allFiles) => {
      let files: Record<string, string> = {};
      // keys are route ids
      // values are file names of the keys

      return files;
    });
  },
};
```
npm package: @remix-routes/feature
Description: Feature routes convention for Remix
Latest version: 0.2.0

# Remix route : feature

Feature routes convention for Remix

This package is a custom remix routes definition. It enables you to get your feature folders in your routes folders.

## Installation

```bash
yarn add -D @remix-routes/feature
```

## Configuration

Update your `remix.config.js`.

```ts
const { defineFeatureRoutes } = require('@remix-routes/feature');
module.exports = {
  ignoredRouteFiles: ['**/*'],
  routes: async (defineRoutes) => {
    return defineFeatureRoutes('app', 'routes', 'routes', defineRoutes);
  },
};
```

### Function defineFeatureRoutes parameters

1. appDir
   is your remix base folder by default set to `app`
2. routesDir
   is your remix routes folder by default set to `routes`
3. outletDir
   is your conventionnal nested routes folder by default set to `routes`

## Feature routes convention

- Every file and folder in the routes folder will be a route.
- Every file and folder in the nested routes folder will be a nested route.
- If a folder is defined as a route his index file will be defined as the route file of the folder
- Other files are skipped

### Example

```
routes/
    auth/
        components/
            LogoutButton.tsx
            LoginForm.tsx
        routes/
            index.tsx
            join.tsx
            login.tsx
            logout.ts
    profile.$userId/
        routes/
            index.tsx
            settings.tsx
        index.tsx
    index.tsx
```

## Some exceptions

Ther is some exceptions for this convention :

- route folder has priority over route file : `profile/index.tsx will` override `profile.tsx`
- index route folder can't have nested route. You must define nested route on the parent folder.