标签云

微信群

扫码加入我们

WeChat QR Code

其中,在一个文件中的js js文件[复制]。

This question already has an answer here:

I'd like to know if it is possible to include a .js file within another .js file?

The reason for me wanting to do this is to keep client includes to a minimum. I have several .js files already written with functions that are needed by the client. The client would have an html file which he/she manages with a .js file include (my .js file).

I could re-write a new .js file with all the functions in it or, to avoid doing double work, figure out a way to write a .js file that includes other .js files.


I just made a Grunt plugin for pretty much the same requirement — it includes only those functions that are used in your main application: github.com/mr-moon/grunt-contrib-resolve

2018年05月28日29分46秒

As it is asynchronous, I'm not sure they will arrive in the order you expect

2018年05月27日29分46秒