I've seen Steve Sanderson's video which named Single Page Application with Knockout JS, the project structure is the component contains the HTML and JS View Model are in the same folder, this is easy to register component.
But In my project, I'm using ruby and slim, render the slim file to HTML on the server side, but the javascript is in the front-end, the slim file path is different from the view model path which is in javascript folder.