将Angular CLI与Squarespace集成 [英] Integrating Angular CLI with Squarespace

查看:75
本文介绍了将Angular CLI与Squarespace集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很想知道是否有人能够在Squarespace网站上成功使用Angular CLI.

我一直在寻找该问题的答案,但找不到解决方案.我知道您可以将自定义脚本添加到Squarespace站点和/或通过CDN添加脚本,但是Angular CLI应用通常使用不同的方法进行部署.

感谢您的帮助.谢谢!

注意:我知道这不是最佳实践,开发人员应通过AWS或类似平台部署Angular CLI应用.

解决方案

我很惊讶没有人回答这个问题.是的,没有理由不能将AngularJS或任何其他Javascript库与Squarespace一起使用.但是,您将需要一个企业"级别的帐户,并且要在此处签出开发人员门户:

https://developers.squarespace.com

Squarespace为您提供了一个Git存储库和一个CLI,您可以通过NPM下载它们,从而可以运行本地Squarespace服务器并从头开始或使用基本模板来开发站点.

您可以在此处查看有关第三者头像(例如Angular)的文档:

https://developers.squarespace.com/custom-javascript/

由于您的问题专门针对使用CLI,因此,我只需要注明最终的生产"捆绑包的外观并将其包含在git存储库中,以便您可以在html主页中对其进行引用.

I am interested to know if anyone has been able to successfully use Angular CLI in a Squarespace site.

I have been searching for answers to this problem but can't find a solution. I know that you can add custom scripts to a Squarespace site and/or add scripts via CDN but Angular CLI apps are usually deployed using a different method.

Any help is appreciated. Thanks!

NOTE: I know that this is not a best practice and devs should deploy their Angular CLI app via AWS or with a similar platform.

解决方案

I'm surprised no one has answered this. Yes, there's no reason why you couldn't use AngularJS or any other Javascript library with Squarespace. You'll need a 'Business' level account, however, and you'll want to check out the developer portal here:

https://developers.squarespace.com

Squarespace provides you with a Git repository and a CLI that you can download via NPM that will let you run a local squarespace server and develop your site from scratch or with a base template.

You can check out their docs on 3rd party avascript (e.g. Angular) here:

https://developers.squarespace.com/custom-javascript/

Since your question is specifically about using the CLI, I would just note whatever your final 'production' bundle looks like and include that in your git repository, so that you can reference it in your main html page.

这篇关于将Angular CLI与Squarespace集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆