有没有办法导入/导出容器绑定脚本 [英] Is there a way to import/export container bound scripts

查看:73
本文介绍了有没有办法导入/导出容器绑定脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个插件,可以使用应用程序脚本(.gs)以及html,js和css文件.

I have an addon which makes use of appscripts (.gs) and also html, js and css files.

当前我们正在做的是参考Google Doc,其中有一个脚本项目,其中包含所有这些源代码.

Currently what we do is we have a reference Google Doc, in which there is a script project which holds all this source code.

但是除了手动复制和粘贴外,没有其他方法可以在GIT中保留源代码的副本.

But there is no way to keep a copy of the source code in GIT, except manual copy and paste.

我在另一篇文章中发现,可以使用URL以JSON格式下载整个项目:

I found in another post that it is possible to download the whole project as a JSON, using the URL :

https://script.google.com/feeds/download/export?id=[project_id]&format=json

可通过文件/项目属性访问[project_id]

where [project_id] is accessible via File/Project Properties

对出口有用.

问题:是否可以在Google文档脚本项目中导入这样的JSON文件?

Question : is there a way to import such a JSON file in a Google docs script project ?

推荐答案

您可以使用'clasp'.效果很好.

You can use 'clasp' for it. It works perfect.

"Clasp是一种独立于Apps Script平台的开源工具,可让您从终端而不是Apps Script编辑器开发和管理Apps Script项目."

"Clasp is an open-source tool, separate from the Apps Script platform, that lets you develop and manage Apps Script projects from your terminal rather than the Apps Script editor."

在此处了解更多信息: https://developers.google.com/apps-script /guides/clasp

Read more here: https://developers.google.com/apps-script/guides/clasp

这篇关于有没有办法导入/导出容器绑定脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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