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: Add symlink script to make symlinking projects in easier #35

Merged
merged 12 commits into from
Jan 31, 2024

Conversation

trevor-coleman
Copy link
Collaborator

@trevor-coleman trevor-coleman commented Jan 31, 2024

This adds a script that will create a symlink to your projects docs for easier testing:

To use the script, you'll need to run it with one of two commands: add or remove.

Add Symlink

The add command creates a new symbolic link. It requires two arguments: the project name and the directory path.

yarn symlink add [project_name] [path_to_directory]

This command creates a symbolic link at ./docs/[project_name] which points to [path_to_directory], and if a
directory exists at that path, backs up the original contents of the directory to ./tmp/[project_name]

For example, if you want to create a symbolic link for a project called ignite-cli and the directory is located
at ../ignite/docs, you'd run:

yarn symlink add ignite-cli ../ignite/docs

And you'll end up with ./docs/ignite-cli which points to ../ignite/docs

Remove Symlink

The remove command deletes an existing symbolic link. It requires only one argument: the project name.

yarn symlink remove [project_name]

This command removes the symbolic link found at ./docs/[project_name].

For example, to remove the symbolic link we created in the earlier example for ignite-cli, you'd run:

yarn symlink remove ignite-cli

Copy link
Contributor

@Jpoliachik Jpoliachik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome work!

works great for me 😄

@trevor-coleman
Copy link
Collaborator Author

Just adding one more feature -- going to get it to handle the /static folder correctly

@trevor-coleman
Copy link
Collaborator Author

OK it now also properly moves items from _static_ folders in projects the same way the CI script does.

@trevor-coleman
Copy link
Collaborator Author

And cleans up the tmp directory if its not needed any more

@trevor-coleman trevor-coleman merged commit 72a7c16 into main Jan 31, 2024
1 check passed
@trevor-coleman trevor-coleman deleted the symlink-script branch January 31, 2024 23:05
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