Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: follow symlinks #90

Merged
merged 1 commit into from
Dec 5, 2023
Merged

Conversation

sarat1669
Copy link
Contributor

Allow symlinks

Allow to share routes using symlinks.

Initialize the project.

npx @remix-run/[email protected] create ./remix-symlink
# ? What type of app do you want to create? Just the basics
# ? Where do you want to deploy? Choose Remix App Server if you're unsure; it's easy to change deployment targets.
# Cloudflare Workers
# ? TypeScript or JavaScript? TypeScript
# ? Do you want me to run `npm install`? Yes

cd ./remix-symlink

Make routes/index.tsx symlink.

mv app/routes app/routes_orig
mkdir app/routes
ln -s ${PWD}/app/routes_orig/index.tsx ${PWD}/app/routes/index.tsx

Show detected routes

npx remix routes --json

Expected Behavior

The routes that is symlink is detected

❯ npx remix routes --json
[
  {
    "id": "root",
    "path": "",
    "file": "root.tsx",
    "children": [
      {
        "id": "routes/index",
        "index": true,
        "file": "routes/index.tsx"
      }
    ]
  }
]

Actual Behavior

routes/index.tsx is not detected as routes even though it exists.

❯ npx remix routes --json
[
  {
    "id": "root",
    "path": "",
    "file": "root.tsx"
  }
]

@sarat1669
Copy link
Contributor Author

@kiliman PTAL

@kiliman kiliman merged commit 7cf4e34 into kiliman:main Dec 5, 2023
3 checks passed
@kiliman
Copy link
Owner

kiliman commented Dec 5, 2023

Thanks for the PR. This has been published as v0.6.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants