我正在使用 Asset Pipeline 构建一些 JavaScript,这些 JavaScript 将移交给许多第三方开发人员。我想在生成的(可能是混淆的)输出文件的顶部放置一个警告注释,但不清楚如何使用 sprockets / coffeescript 组合来实现这一点。
# This is a manifest file that'll be compiled into including all the files listed below.
# Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
# be included in the compiled file accessible from http://example.com/assets/application.js
# It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
# the compiled file.
###
The following code was compiled from source by MF.
Please do not edit this JavaScript directly.
####
#= require util/extensions
#= require util/date_manipulation
#= require util/format
#= require points_data
#= require graphics/canvas_graphics
#= require graphics/explorer_canvas_graphics
#= require renderer
我得到以下结果:
(function() {
/*
The following code was compiled from source by MF.
Please do not edit this JavaScript directly.
*/
}).call(this);
我想要的是这个(或接近的东西):
/*
The following code was compiled from source by MF.
Please do not edit this JavaScript directly.
*/
(function() {
// ******** my compiled code from all those required files! *******
}).call(this);
我要如何让它工作?