Skip to content

Make it easy to link static websites without public folder - #130

Closed
stefansundin wants to merge 2 commits into
powder-rb:masterfrom
stefansundin:link-static-website
Closed

Make it easy to link static websites without public folder#130
stefansundin wants to merge 2 commits into
powder-rb:masterfrom
stefansundin:link-static-website

Conversation

@stefansundin

Copy link
Copy Markdown
Contributor

This is an alternative to #115. I think it's a cleaner solution.

@stefansundin stefansundin changed the title Make it easy to link static websites Make it easy to link static websites without public folder Jun 13, 2017
@philnash

Copy link
Copy Markdown
Collaborator

To be clear here. This creates the public directory under ~/.pow/dir_name and that then works for static sites in the folder?

What needed updating in the unlink command? Why might there be an error saying that the symlink couldn't be removed?

@stefansundin

Copy link
Copy Markdown
Contributor Author

Correct. It creates ~/.pow/dir_name, and then creates a symlink from ~/.pow/dir_name/public to the current directory. Basically emulating public/ without requiring you to create a public directory in your project.

I need to update unlink because rm_f is unable to delete ~/.pow/dir_name if it is a directory. The reason I added the check is to not say "successfully" if we just assume the previous call worked. Before I changed rm_f to rm_rf, it said that it was successful but it wasn't.

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