The only code that should sit outside the public directory is Application level code, by the looks of it your PHP.
All other assets that are loaded by your server should live in the public directory, that's why it's called public, because it's accessible by the public through your webserver's requests.
An alternative would be to create a js-source directory at the root of the project and have a task manager like Grunt or Gulp compile and copy the js into your public directory, that would look something like this:
project-name/
application/
config/
controllers/
models/
views/
public/
css/
images/
js/ <- is filled with js from js-source/ by grunt/gulp
.htaccess
index.php
js-source/
vendor/
main.js <- is uglified/concatinated & copied into public/js by grunt/gulp
.htaccess
Reference links: