Node.js 自定义\u元素\u apigen:将图纸数据表导入Dart时出错
I遵循以下步骤,符合:Node.js 自定义\u元素\u apigen:将图纸数据表导入Dart时出错,node.js,dart,dart-polymer,Node.js,Dart,Dart Polymer,I遵循以下步骤,符合: 已安装节点/npm(v3.5.3) 已安装凉亭(v1.7.2) 已安装水解(v1.21.4) .bowerrc使用以下内容创建 { “目录”:“lib/src” } bower安装--保存纸张数据表()已执行 apigen.yaml使用以下内容创建 要生成的文件: -paper datatable\paper datatable.html 自定义\u元素\u apigen库加载项pubspec.yaml 依赖项: 自定义元素apigen:^0.2.1+1 pub-run-
.bowerrc
使用以下内容创建{
“目录”:“lib/src”
}
bower安装--保存纸张数据表
()已执行apigen.yaml
使用以下内容创建依赖项:
自定义元素apigen:^0.2.1+1
pub-run-custom\u-element\u-apigen:update-apigen.yaml
已执行命令process\u elements.bat
(而不是process\u elements.sh
):
node packages\custom\u element\u apigen\src\js\analyze.js%1
我编辑了generate\u dart\u api.dart
,并将调用.bat
改为.sh
:
'D:/Users/Administrador/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/custom_element_apigen-0.2.1+1/lib/src/js/process_elements.bat', [inputPath]);
然后,我得到了一个工作区
第二个错误,我没有解决
现在,当执行命令c:\dart sdk\bin\pub run custom\u element\u apigen:update apigen.yaml
时,出现以下问题:
D:\Users\Administrador\WebstormProjects\Facilis>c:\dart-sdk\bin\pub run custom_e
lement_apigen:update apigen.yaml
←[32m1 of 1: lib\src\paper-datatable\paper-datatable.html←[0mUnhandled exception
:
Failed to parse element files!
exit code: 0
stderr:
stdout:
D:\Users\Administrador\WebstormProjects\Facilis>node packages\custom_element_api
gen\src\js\analyze.js lib\src\paper-datatable\paper-datatable.html
{"imports":["lib/src/polymer/polymer.html","lib/src/paper-datatable/paper-datata
ble-column.html","lib/src/paper-datatable/paper-datatable-edit-dialog.html","lib
/src/paper-datatable/datatable-icons.html","lib/src/paper-checkbox/paper-checkbo
x.html","lib/src/paper-tooltip/paper-tooltip.html"],"elements":{"PaperDatatable"
:{"name":"paper-datatable","properties":{"data":{"hasGetter":true,"hasSetter":tr
ue,"name":"data","type":"Array","description":"\nArray of objects containing the
data to be shown in the table.\n\n"},"multiSelection":{"hasGetter":true,"hasSet
ter":true,"name":"multiSelection","type":"Boolean","description":"\nWhether to a
llow selection of more than one row.\n\n"},"progress":{"hasGetter":true,"hasSett
er":true,"name":"progress","type":"Boolean","description":"\nWhether to show the
progress bar. As the progress bar is often not used in standalone\n`<paper-data
table>'s the `<paper-progress>` element isn't included by default and needs to b
e\nmanually imported.\n\n"},"resizeBehavior":{"hasGetter":true,"hasSetter":true,
"name":"resizeBehavior","type":"String","description":"\nOverflow, fixed or 'dyn
amic-columns'\n\n"},"selectable":{"hasGetter":true,"hasSetter":true,"name":"sele
ctable","type":"Boolean","description":"\nWhether to show checkboxes on the left
to allow row selection.\n\n"},"selectedItem":{"hasGetter":true,"hasSetter":true
,"name":"selectedItem","type":"Object","description":"\nIf `multi-selection` is
off then this contains the selected row.\n\n"},"selectedItems":{"hasGetter":true
,"hasSetter":true,"name":"selectedItems","type":"Array","description":"\nIf `mul
ti-selection` is on then this contains an array of the selected rows.\n\n"},"sel
ectedKey":{"hasGetter":true,"hasSetter":true,"name":"selectedKey","type":"Object
","description":"\nIf `multi-selection` is off then this contains the key of the
selected row.\n\n"},"selectedKeys":{"hasGetter":true,"hasSetter":true,"name":"s
electedKeys","type":"Array","description":"\nIf `multi-selection` then this cont
ains an array of selected row keys.\n\n"},"listeners":{"hasGetter":true,"hasSett
er":true,"name":"listeners","type":"Object","description":""},"observers":{"hasG
etter":true,"hasSetter":true,"name":"observers","type":"Array","description":""}
},"methods":{"customRowStyle":{"name":"customRowStyle","type":null,"description"
:"\nMethod that can be overwritten to apply a custom style to specific rows.\n\n
IMPORTANT: This is a property, not a method you should call directly.\n\t\t\t\t
","isVoid":true,"args":[{"name":"rowItem","description":""}]},"deselect":{"name"
:"deselect","type":null,"description":"\nDeselect the specified item. Ignore the
`notify` parameter.\n\n","isVoid":true,"args":[{"name":"item","description":""}
,{"name":"notify","description":""}]},"deselectAll":{"name":"deselectAll","type"
:null,"description":"\nDeselect all currently selected items. Ignore the `notify
` parameter.\n\t\t\t\t ","isVoid":true,"args":[{"name":"notify","description":""
}]},"filter":{"name":"filter","type":null,"description":"\nThe filter attribute
can be used to specify a filter which will be applied to the `data`.\nNote that
selections should fully ignore filtering, and a filter only affects which data i
s\nvisible.\n\nThe function takes three arguments: `item`, `key` and `items` per
the JS filter function.\n\nFor a demo please see [here](demo/filter.html).\n\nI
MPORTANT: This is a property, not a method you should call directly.\n\n","isVoi
d":true,"args":[]},"reload":{"name":"reload","type":null,"description":"\nIf you
have been changing data on the `data` property outside of the official Polymer
functions\ncalling this function *may* get you the updates you want.\n\t\t\t\t "
,"isVoid":true,"args":[]},"reset":{"name":"reset","type":null,"description":"\nH
ardcore reset of the entire element. Sets `data` to `[]` and resets all cells.\n
\t\t\t\t ","isVoid":true,"args":[]},"select":{"name":"select","type":null,"descr
iption":"\nSelect the specified item. Ignore the `notify` parameter.\n\n","isVoi
d":true,"args":[{"name":"item","description":""},{"name":"notify","description":
""}]},"sort":{"name":"sort","type":null,"description":"\nSort the specified colu
mn, where `column` is a reference to the actual `<paper-datatable-column>`\nelem
ent.\n\t\t\t\t ","isVoid":true,"args":[{"name":"column","description":""}]},"tog
gleAll":{"name":"toggleAll","type":null,"description":"\nTriggered by clicking t
he top left checkmark. If all are checked it will deselect all checked items.\nI
f some or none are checked it will select all items\n\t\t\t\t ","isVoid":true,"a
rgs":[]},"ready":{"name":"ready","type":null,"description":"","isVoid":true,"arg
s":[]}},"description":"\n# Paper Datatable\n\nA [material design implementation
of a data table](https://www.google.com/design/spec/components/data-tables.html)
.\n\n","behaviors":["Polymer.IronResizableBehavior"]}},"behaviors":{},"path":"li
b\\src\\paper-datatable\\paper-datatable.html"}
#0 _parseError (package:custom_element_apigen/generate_dart_api.dart:202:3)
#1 _parseFile.<_parseFile_async_body> (package:custom_element_apigen/genera
te_dart_api.dart:160:5)
#2 _RootZone.runUnary (dart:async/zone.dart:1149)
#3 _Future._propagateToListeners.handleValueCallback (dart:async/future_imp
l.dart:502)
#4 _Future._propagateToListeners (dart:async/future_impl.dart:585)
#5 _Future._completeWithValue (dart:async/future_impl.dart:376)
#6 Future.wait.<anonymous closure> (dart:async/future.dart:299)
#7 _RootZone.runUnary (dart:async/zone.dart:1149)
#8 _Future._propagateToListeners.handleValueCallback (dart:async/future_imp
l.dart:502)
#9 _Future._propagateToListeners (dart:async/future_impl.dart:585)
#10 _Future._completeWithValue (dart:async/future_impl.dart:376)
#11 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:
430)
#12 _microtaskLoop (dart:async/schedule_microtask.dart:43)
#13 _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)
#14 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dar
t:151)
D:\Users\Administrator\WebStormProject\Facilis>c:\dart sdk\bin\pub运行自定义\u e
lement_apigen:更新apigen.yaml
←[32m1/1:lib\src\paper-datatable\paper-datatable.html←[0未处理的异常
:
无法分析元素文件!
退出代码:0
标准:
标准:
D:\Users\Administrator\WebStormProject\Facilis>node packages\custom\u element\u api
gen\src\js\analyze.js lib\src\paper-datatable\paper-datatable.html
{“imports”:[“lib/src/polymer/polymer.html”,“lib/src/paper-datatable/paper-datata”
table column.html”、“lib/src/paper datatable/paper datatable edit dialog.html”、“lib
/src/paper-datatable/datatable-icons.html”、“lib/src/paper-checkbox/paper-checkbo
x、 html“,”lib/src/paper-tooltip/paper-tooltip.html“,”元素“:{“PaperDatatable”
:{“name”:“paper datatable”,“properties”:{“data”:{“hasGetter”:true,“hasSetter”:tr
ue,“名称”:“数据”,“类型”:“数组”,“描述”:“\n包含
要在表中显示的数据。\n\n“},“多重选择”:{“hasGetter”:true,“hasSet”
ter“:true,“name”:“multiSelection”,“type”:“Boolean”,“description”:“\n是否为
允许选择多行。\n\n“},“进度”:{“hasGetter”:true,“hasSett”
er“:true,“name”:“progress”,“type”:“Boolean”,“description”:“\n是否显示
进度条。由于进度条通常不在独立的\n`'中使用,``元素在默认情况下不包括,需要
e\n手动导入。\n\n“},“resizeBehavior”:{“hasGetter”:true,“hasSetter”:true,
“名称”:“resizeBehavior”、“类型”:“字符串”、“说明”:“\n流量、固定或“动态”
amic列“\n\n”},“可选”:{“hasGetter”:true,“hasSetter”:true,“name”:“sele”
ctable“,”type“:”Boolean“,”description“:\n是否在左侧显示复选框
允许行选择。\n\n“},“selectedItem”:{“hasGetter”:true,“hasSetter”:true
,“名称”:“selectedItem”,“类型”:“对象”,“描述”:“\n如果“多选”是
关闭,则包含所选行。\n\n“},“selectedItems”:{“hasGetter”:true
,“hasSetter”:true,“name”:“selectedItems”,“type”:“Array”,“description”:“\nIf`mul”
ti selection`处于启用状态,则它包含所选行的数组。\n\n“}”,sel
ectedKey:{“hasGetter”:true,“hasSetter”:true,“name”:“selectedKey”,“type”:“Object”
,“description”:“\n如果“multi-selection”处于禁用状态,则它包含
所选行。\n\n“},“selectedKeys”:{“hasGetter”:true,“hasSetter”:true,“name”:“s”
所选键“,”类型“:”数组“,”说明“\n如果“多选”,则此继续
获取选定行键的数组。\n\n“},“侦听器”:{“hasGetter”:true,“hasSett”
er:true,“name”:“listeners”,“type”:“Object”,“description”:“}”,observer:{“hasG”
etter“:true,“hasSetter”:true,“name”:“observer”,“type”:“Array”,“description”:“}
},“方法”:{“customRowStyle”:{“名称”:“customRowStyle”,“类型”:null,“说明”
:“\n可以覆盖以将自定义样式应用于特定行的方法。\n\n
重要提示:这是一个属性,不是应该直接调用的方法。\n\t\t\t\t
,“isVoid”:true,“args”:[{“name”:“rowItem”,“description”:“}]}”,取消选择:{“name”
:“取消选择”,“类型”:null,“说明”:“\n取消选择指定项。忽略
`通知`parameter.\n\n,“isVoid”:true,“args”:[{“name”:“item”,“description”:“}
,{“名称”:“通知”,“说明”:“}]},“取消全部”:{“名称”:“取消全部”,“类型”
:null,“说明”:“\n取消选择所有当前选定的项目。忽略“通知”
`参数。\n\t\t\t\t,“isVoid”:true,“args”:[{“name”:“notify”,“description”:”
}]},“筛选器”:{“名称”:“筛选器”,“类型”:null,“说明”:“\n筛选器属性”
可用于指定将应用于“数据”的筛选器。\n注意
选择应该完全忽略筛选,并且筛选只影响我选择的数据
s\n不可见。\n\n该函数每个接受三个参数:`item`、`key`和`items`
JS筛选器函数。\n\n有关演示,请参见[此处](demo/filter.html)。\n\n
重要提示:这是一个属性,而不是应该直接调用的方法。\n\n“,”isVoi
d:true,“args”:[]},“reload”:{“name”:“reload”,“type”:null,“description”:“\n如果您
一直在官方范围外更改“data”属性的数据
函数\n调用此函数*可以*获得所需的更新。\n\t\t\t\t“
,“isVoid”:true,“args”:[]},“reset”:{“name”:“reset”,“type”:null,“description”:“\nH”
整个元素的ardcore重置。将“数据”设置为“[]”并重置所有单元格。\n
\t\t\t\t,“isVoid”:true,“args”:[]},“select”:{“name”:“select”,“type”:null,“descr”
iption:“\n选择指定的项。忽略'notify'参数。\n\n”“isVoi”
d:true,“args”:[{“name”:“item”,“description”:“},{“name”:“notify”,“description”:
“}]}”,排序:{“名称”:“排序”