Is there a way to include file in coffee script?(有没有办法在咖啡脚本中包含文件?)
问题描述
我想知道是否有办法在咖啡脚本中包含文件.类似于 C 中的 #include
或 PHP 中的 require
...
I'd like to know if there is a way to include a file in a coffee script.
Something like #include
in C or require
in PHP...
推荐答案
coffeescript-concat 怎么样一个>?
coffeescript-concat 是一个预处理和连接的实用程序CoffeeScript 源文件.
coffeescript-concat is a utility that preprocesses and concatenates CoffeeScript source files.
它可以很容易地将您的 CoffeeScript 代码保存在单独的单元中,并且仍然可以轻松运行它们.你可以保持你的源在逻辑上分开没有将它们放在一起运行或嵌入的挫败感一个网页.此外,coffeescript-concat 会给你一个可以轻松编译为单个 Javascript 文件的源文件.
It makes it easy to keep your CoffeeScript code in separate units and still run them easily. You can keep your source logically separated without the frustration of putting it all together to run or embed in a web page. Additionally, coffeescript-concat will give you a single sourcefile that will easily compile to a single Javascript file.
这篇关于有没有办法在咖啡脚本中包含文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:有没有办法在咖啡脚本中包含文件?


基础教程推荐
- 检查 HTML5 拖放文件类型 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- Bokeh Div文本对齐 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- npm start 错误与 create-react-app 2022-01-01