【问题标题】:Sails auto include assets file issueSails 自动包含资产文件问题
【发布时间】:2014-11-18 10:49:24
【问题描述】:

我希望sails 包含带有排序顺序的资产文件。 示例:我想先包含 jquery.js,然后是 bootstrap.js 但是sails包括排序abc,它首先包括bootstrap.js,然后是jquery.js

【问题讨论】:

    标签: sails.js


    【解决方案1】:

    在sails js 版本v0.10.5 中,只需在jsFilesToInject 块中执行task/pipeline.js,将指向jquery 文件的链接放在该块的第一行。 喜欢:

    var jsFilesToInject = [
    
          // Load sails.io before everything else
          'js/dependencies/sails.io.js',
    
          // will be injected here in no particular order.
          'js/jquery.js',
    
          // will be injected here in no particular order.
          'js/**/*.js',
    
          // Dependencies like jQuery, or Angular are brought in here
          'js/dependencies/**/*.js'
    
          // All of the rest of your client-side js files
        ];

    【讨论】:

      猜你喜欢
      • 2021-03-08
      • 1970-01-01
      • 1970-01-01
      • 2015-09-03
      • 2017-09-28
      • 1970-01-01
      • 2013-10-18
      • 2011-11-24
      • 2017-08-27
      相关资源
      最近更新 更多