【发布时间】:2025-11-20 22:50:02
【问题描述】:
我希望sails 包含带有排序顺序的资产文件。 示例:我想先包含 jquery.js,然后是 bootstrap.js 但是sails包括排序abc,它首先包括bootstrap.js,然后是jquery.js
【问题讨论】:
标签: sails.js
我希望sails 包含带有排序顺序的资产文件。 示例:我想先包含 jquery.js,然后是 bootstrap.js 但是sails包括排序abc,它首先包括bootstrap.js,然后是jquery.js
【问题讨论】:
标签: sails.js
在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
];
【讨论】: