aurelia-ui-toolkits / aurelia-syncfusion-bridge

27 stars 21 forks source link

Typedoc issues in Aurelia source #26

Closed karthickthangasamy closed 8 years ago

karthickthangasamy commented 8 years ago

While generating typedoc for aurelia-syncfusion-bridge source, initially faced issue like below.

C:\aurelia>gulp doc
[12:25:05] Using gulpfile C:\aurelia\gulpfile.js
[12:25:05] Starting 'doc'...
[12:25:05] Starting 'doc-generate'...
[12:25:06]
TypeDoc 0.3.12
Using TypeScript 1.6.2 from C:\aurelia\node_modules\gulp-typedoc\node_modules\typedoc\node_modules\typescript\lib

[12:25:21] C:\aurelia/devbuild/aurelia-syncfusion-bridge.d.ts(1)
 Cannot find module 'aurelia-framework'.
[12:25:21] 'doc-generate' errored after 16 s
[12:25:21] Error in plugin 'gulp-typedoc'
Message:
    Failed to generate load TypeDoc project.
[12:25:21] 'doc' errored after 16 s
[12:25:21] Error in plugin 'run-sequence(doc-generate)'
Message:
    doc-generate stream

C:\aurelia>

The above issue resolved while installing aurelia-framework npm package.

Currently facing exceptions in the below aurelia-framework source files.

[11:34:01] Using gulpfile C:\aurelia\gulpfile.js
[11:34:01] Starting 'doc'...
[11:34:01] Starting 'doc-generate'...
[11:34:02] 
TypeDoc 0.3.12
Using TypeScript 1.6.2 from C:\aurelia\node_modules\gulp-typedoc\node_modules\typedoc\node_modules\typescript\lib

[11:34:10] C:\aurelia/jspm_packages/npm/aurelia-history-browser@1.0.0-beta.1.0.1/aurelia-history-browser.d.ts(3)
 Cannot find module 'aurelia-history'.
[11:34:10] C:\aurelia/jspm_packages/npm/aurelia-loader@1.0.0-beta.1.1.0/aurelia-loader.d.ts(21)
 Duplicate identifier 'TemplateDependency'.
[11:34:10] C:\aurelia/jspm_packages/npm/aurelia-loader@1.0.0-beta.1.1.0/aurelia-loader.d.ts(44)
 Duplicate identifier 'TemplateRegistryEntry'.
[11:34:10] C:\aurelia/jspm_packages/npm/aurelia-loader@1.0.0-beta.1.1.0/aurelia-loader.d.ts(98)
 Duplicate identifier 'Loader'.
[11:34:10] C:\aurelia/jspm_packages/npm/aurelia-loader@1.0.0-beta.1.2.0/aurelia-loader.d.ts(25)
 Duplicate identifier 'TemplateDependency'.
[11:34:10] C:\aurelia/jspm_packages/npm/aurelia-loader@1.0.0-beta.1.2.0/aurelia-loader.d.ts(48)
 Duplicate identifier 'TemplateRegistryEntry'.
[11:34:10] C:\aurelia/jspm_packages/npm/aurelia-loader@1.0.0-beta.1.2.0/aurelia-loader.d.ts(105)
 Duplicate identifier 'Loader'.
[11:34:10] C:\aurelia/jspm_packages/npm/aurelia-router@1.0.0-beta.1/aurelia-router.d.ts(5)
 Cannot find module 'aurelia-history'.
[11:34:10] 'doc-generate' errored after 8.9 s
[11:34:10] Error in plugin 'gulp-typedoc'
Message:
    Failed to generate load TypeDoc project.
[11:34:10] Finished 'doc' after 8.91 s

I am also tried to run the aurelia-kendo-bridge source, facing the same error. Could you please guide me, how can I proceed further on this?

adriatic commented 8 years ago

@karthickthangasamy I believe that the task doc.js presumes special formatting of the code you want to generate the docs for. As far as I know only aurelia core framework code is formatted that way and the autogenerated docs can be seen here

We never considered to use this in bridges as the type of docs we wanted to have is different from API docs - and Aurelia's autogenerate technology is not ready to be used outside the core team.

As I am not sure that all this is accurate, I will ask others to confirm or correct it.

JeroenVinke commented 8 years ago

This is because aurelia-framework is used while aurelia-framework is not a dependency of the plugin

You have two options, remove the aurelia-framework imports or add the aurelia-framework dependency.

Removing the aurelia-framework imports here you import inlineView from aurelia-framework but you can also import this from aurelia-templating. You can also get rid of this import and remove the : Aurelia typing as the config function is not used directly by users of the bridge.

Adding the aurelia-framework dependency here. I'd actually recommend against adding a dependency on aurelia-framework, as that increases the chance of users having JSPM forks.

JeroenVinke commented 8 years ago

Also, make sure that you run gulp build before gulp doc as the d.ts file of the syncfusion bridge is generated by gulp build

karthickthangasamy commented 8 years ago

@JeroenVinke Thanks for the update. We can go with the first option.

Removing the aurelia-framework imports.

I made the required changes and committed in repository.