如何制作自定义Google Web Designer组件?
我原以为他们会像Adobe Flash Components一样。它处于测试阶段,我无法找到很多相关信息。
我已尝试搜索/Applications/Google Web Designer.app/Contents
下的所有目录,看看我是否可以侦察一些样本。文档面向用户:https://support.google.com/webdesigner/
我想构建团队可以使用的HTML5广告组件。
答案 0 :(得分:3)
为您的组件创建json清单:
{
name: {string} A human readable name
description: {string} A succinct but complete description of the component
type: {string} The element type, which must contain a dash (-)
version: {number} The version number, which must be incremented with each update
files: {Array.<FilesObject>} The JS and CSS files for the component
externalScripts: {Array.<string>} The external script dependencies
dependencies: {Array.<string>} The dependent types
attributes: {Array.<Attribute>} The attributes of the component
methods: {Array.<Method>} The methods of the component
events: {Array.<Event>} The events dispatched by the component
metrics: {Array.<MetricEvent>} Events that must be tracked as a metric
}
创建所有必需的.js和.css,然后打包组件。
在以下链接中,您可以找到有关如何为GWD创建自定义组件的教程。
希望它有所帮助。