简体   繁体   English

Shopify Dashing:如何包含外部Javascript? (例如Raphael.js)

[英]Shopify Dashing: How do I include external Javascript? (e.g Raphael.js)

I'm putting together a Shopify Dashing widget that will use the Raphael.js library to draw SVG objects on the client (ie dashboard). 我正在组装一个Shopify Dashing小部件,它将使用Raphael.js库在客户端(即仪表板)上绘制SVG对象。

I have the code working in a standalone manner in pure JavaScript, rendering everything I need. 我让代码在纯JavaScript中以独立方式工作,呈现了我所需的一切。

However, now I need to import the Raphael.js library in the widget's .coffee file, and am really struggling with this. 但是,现在我需要在小部件的.coffee文件中导入Raphael.js库,并且确实为此感到困惑

Does anyone know how to include external JavaScript libraries from within a Dashing widget's code? 有谁知道如何在Dashing小部件的代码中包括外部JavaScript库?

在Dashing GitHub页面上为我找到了答案-在此处查看链接: https : //github.com/Shopify/dashing/issues/393#event-137431060

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM