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

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

问题描述

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

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

感谢任何帮助.谢谢!

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

解决方案

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

https://developers.squarespace.com

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

您可以在此处查看他们关于 3rd 方 avascript(例如 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天全站免登陆