How to specify the boot sequence of scripts?

Smoke sails. They have their own wrapper to work with socket.io on the client. try to connect from another script:
var socket = io.connect()
And io is not yet created. In the browser console get error that io is undefined, and then log the successful boot of wrapper
September 19th 19 at 00:04
3 answers
September 19th 19 at 00:06
Sails uses Grunt to build the application. As I understand it from the description sailsjs.org/#!/documentation/concepts/Assets/TaskA...
it does not collect all files in a pile. Supposed to be some plugin for Grunt, which will collect all files in a bunch of (concat), and then make minification. If you combine this with the tracking system isoniemi files (file index), you get the full pipeline (tasks/pipeline.js) to build client side web applications.
In the end, you need to simply determine the order of the files in jsFilesToInject.
September 19th 19 at 00:08
Write your own module to pull scripts, which after a successful pull will perform colback function... although it should go, I was connected somewhere in the middle, under certain conditions, jQuery and a few more additions to it and launched the necessary changes.
Not going out, Smoking, reading about AMD, in particular about requir etc... Require well managed connection modules, shrink for need etc... just judging from Google, there are bundles sails with requirem...
"do not come out, Smoking, reading about AMD, in particular about requir etc.." it is generally not understood - Damion_Casp commented on September 19th 19 at 00:11
: https://ru.wikipedia.org/wiki/Asynchronous_module_...
requirejs (in Gema for ruby too, and not only as private of Liba, as with other languages backend integration, XS) - elinore.Ebert83 commented on September 19th 19 at 00:14
after editing the comments all became clear. Thank you) - Damion_Casp commented on September 19th 19 at 00:17
September 19th 19 at 00:10
As output, the timer to check whether the connected io, and after connect to reset the timer and transmit action is dependent on io functions.

Find more questions by tags JavaScript