I made a game in JavaScript. I have a directory called Game, and it contains:
index.htmlapp.cssimgslibvendor
Inside of lib I have my own javascript files. Inside of vendor I have a javascript file from a third party, that is used for a specific functionality in the game. I'm using webpack to bundle my modules, and so inside of lib I also keep my bundle.js file.
I now want to add a Rails backend to the game. I am very familiar with writing code using Ruby on Rails, but there are holes in my knowledge of where certain files should go in the directory structure.
If I transform my purely javascript/html/css game into a Rails application with a single page (the root page with the game on it), where do the files I listed above go?
Here is how I think it would be:
index.htmlwould become myapp/views/layouts/application.html.erbapp.csswould becomeapp/assets/stylesheets/application.css- the contents of my
imgsfolder would go in/public(actually it has never made sense to me why I it never works when I put my images inapp/assets/images, but that's another story) - the contents of my
libfolder would go inapp/assets/javascripts(hope I don't have the same issue as with my images) - and the javascript file contained in my
vendorfolder would go in/vendor
Is this correct? Are there any other considerations to take into account?
javascriptfiles which are there inside yourvendorshould go inside '/vendor'