In Meteor JS, how to control Javascript load order in relation to DOM load order? For animations

后端 未结 5 605
孤独总比滥情好
孤独总比滥情好 2021-01-03 07:48

I\'ve got a template that I downloaded:

http://halibegic.com/projects/merlin/

I want to use it in Meteor and I\'m having major issues with

&         


        
5条回答
  •  无人及你
    2021-01-03 08:25

    It's clear from here:Meteor Docs

    It is best to write your application in such a way that it is insensitive to the order in which files are loaded, for example by using Meteor.startup, or by moving load order sensitive code into packages, which can explicitly control both the load order of their contents and their load order with respect to other packages. However sometimes load order dependencies in your application are unavoidable.

    When not using special filenames and directories:

    Files in subdirectories are loaded before files in parent directories, so that files in the deepest subdirectory are loaded first, and files in the root directory are loaded last. - Within a directory, files are loaded in alphabetical order by filename. Below is a complete list of special file and directory names that control file load order:

    lib

    After sorting as described above, all files under directories named lib are moved before everything else, preserving their order.

    main.*

    All files that match main.* are moved after everything else, preserving their order.

提交回复
热议问题