0

Is it possible to override a remote JavaScript file with a local copy for one developer?

Use case: A JavaScript Developer who has not yet proven them self is asked to fix certain bugs in a JavaScript file. The file is part of a larger application, and you don't want to give this developer write access to the server copy yet. The application should run off our server just as intended, but for this one user, when the one file, SomeFile.js, is included, it includes a local version of SomeFile.js which is on that developer's own computer. Everything else runs in place.

Can this be done?

  1. I can change the tag in the meta head with firebug, but the change doesn't stick on refresh. Is there another plug-in that can do this?
  2. Can a file be overridden at the OS level, with a file similar to the hosts file (it would need to remap one file, not the domain)?

1 Answer 1

1

The best thing to do is give every developer a test server. This is pretty easy to do with VMs. Then, they can modify whatever they want. Use version control, and there is nothing to worry about.

Sure, you could configure a proxy to load a different copy for specific URLs, but why would you want to? Give your developers the tools they need to get the job done.

Sign up to request clarification or add additional context in comments.

2 Comments

When it comes to freelance developers, everyone's an "expert". We've gone through many of these "experts", who did nothing more than make a giant mess. All were able to correctly answer questions about the language and had good references. Sometimes the only way to determine if someone is right for the job is to give them a real world problem to solve. If they can solve it, then, yes, we can grant access to a development environment. But as part of the hiring process, we want to give them a short test job they can do on their own without all the overhead of creating VMs, accounts, etc.
@Nick, I didn't realize this was someone you haven't hired yet. You should add that information to your question, as that changes the potential solution. Yes, you can override anything you want in JavaScript. It is a very dynamic language. But, that probably isn't the best solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.