You simply place the file under the application/yourapp/static/js/ folder and you import it from the html.
You can import in the layout.html with <script src="{{=URL('static','js/myfile.js')}}"></script> or you can import it from the python code (model or controller) with
response.files.append(URL('static','js/myfile.js'))
This will generate the <script>...</script> for you.