Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] - StencilJS projects support #640

Closed
napolev opened this issue Sep 2, 2018 · 7 comments
Closed

[FEATURE] - StencilJS projects support #640

napolev opened this issue Sep 2, 2018 · 7 comments

Comments

@napolev
Copy link

napolev commented Sep 2, 2018

Overview of the issue

Just want to have support for StencilJS projects.

https://stenciljs.com/docs/getting-started

Operating System, Node.js, npm, compodoc version(s)

$ winver
Windows 10

$ node -v
v8.11.2

$ npm -v
6.1.0

Angular configuration, a package.json file in the root folder

package.json:

https://github.com/napolev/web-components/blob/master/package.json

Actual repository:

https://github.com/napolev/web-components/

Compodoc installed globally or locally ?

Compodoc installed both globally and locally.

If possible sourcecode of the file where it breaks

The generation doesn't break, it just doesn't generate the documentation for my two components as you can see here:

https://napolev.github.io/web-components/documentation/

Here are the two components:

https://github.com/napolev/web-components/tree/master/src/components

If possible your terminal logs before the error
	$ npm run compodoc

	> web-components@0.0.1 compodoc D:\webapp37-web-components
	> compodoc -p src/tsconfig.app.json

	1.1.5

	Typescript version : 2.9.1

	Node.js version : v8.11.2

	Operating system : Windows 10

	[10:43:43] No configuration file found, switching to CLI flags.
	[10:43:43] Using tsconfig file : D:\webapp37-web-components\src\tsconfig.app.json
	[10:43:44] Ignoring       : D:\webapp37-web-components\src\components.d.ts
	[10:43:44] Including      : D:\webapp37-web-components\src\index.html
	[10:43:44] Including      : D:\webapp37-web-components\src\tsconfig.app.json
	[10:43:44] Including      : D:\webapp37-web-components\src\components\thumb-01-product\thumb-01-product.scss
	[10:43:44] Including      : D:\webapp37-web-components\src\components\thumb-01-product\thumb-01-product.tsx
	[10:43:44] Including      : D:\webapp37-web-components\src\components\thumb-02-product\thumb-02-product.scss
	[10:43:44] Including      : D:\webapp37-web-components\src\components\thumb-02-product\thumb-02-product.tsx
	[10:43:44] Searching package.json file
	[10:43:44] package.json file found
	[10:43:44] Processing package.json dependencies
	[10:43:44] Searching README.md, CHANGELOG.md, CONTRIBUTING.md, LICENSE.md, TODO.md files
	[10:43:44] README.md file found
	[10:43:44] Error during D:\webapp37-web-components\CHANGELOG read
	[10:43:44] Continuing without CHANGELOG.md file
	[10:43:44] Error during D:\webapp37-web-components\CONTRIBUTING read
	[10:43:44] Continuing without CONTRIBUTING.md file
	[10:43:44] Error during D:\webapp37-web-components\LICENSE read
	[10:43:44] Continuing without LICENSE.md file
	[10:43:44] Error during D:\webapp37-web-components\TODO read
	[10:43:44] Continuing without TODO.md file
	[10:43:44] Get dependencies data
	[10:43:44] -------------------
	[10:43:44] Project statistics
	[10:43:44] -------------------
	[10:43:44] Prepare components
	[10:43:44] Prepare modules
	[10:43:44] Process documentation coverage report
	[10:43:44] Process main graph
	[10:43:45] Process pages
	[10:43:45] Process page   : coverage
	[10:43:45] Process page   : dependencies
	[10:43:45] Process page   : index
	[10:43:45] Process page   : modules
	[10:43:45] Process page   : overview
	[10:43:45] Process menu...
	[10:43:46] Copy main resources
	[10:43:48] Documentation generated in ./documentation/ in 5.881 seconds using gitbook theme
Motivation for or Use Case

Need to document an StencilJS project, which uses TypeScript (similar use cases this beautiful tool can handle).

Reproduce the error
  1. Clone this repository: https://github.com/napolev/web-components
  2. Run: $ npm i
  3. Run: $ npm run compodoc
Related issues

Opened a thread here:

https://stackoverflow.com/questions/52138422/generating-api-doc-for-an-stencil-project-with-multiple-components

And here:

https://forum.ionicframework.com/t/generating-api-doc-for-an-stencil-project-with-multiple-components/140460

Suggest a Fix

I don't have a clear idea on how to suggest a fix for this but I think it will be really easy for you to figure this out because StencilJS uses TypeScript as well. I strongly suggest you that incorporate one session on your documentation for StencilJS projects since that's a really good framework.

Thanks!

@vogloblinsky
Copy link
Contributor

Hi,
Thanks for creating this issue. Stencil is a good compiler, and the syntax is very close to Angular, i think it will not be too difficult to support this kind of project.

@napolev
Copy link
Author

napolev commented Sep 2, 2018

I'm agree @vogloblinsky. Yes, I think Stencil has a great present and even better future.
One question, even though your great tool Compdoc is not handling a Stencil project out of the box, do you think there is maybe some configuration I could do manually to make it work?

@vogloblinsky
Copy link
Contributor

Ok first issue resolved, there was a filter inside compodoc just for .tsfiles. Adding .tsx files and i got your 2 components.

@napolev
Copy link
Author

napolev commented Sep 2, 2018

Oh! that's great @vogloblinsky, so, what do I need to do to make this work?, do I have to change something on my configuration files, or just wait for you to upgrade your repository and I reinstall the Compodoc node_module again?

@vogloblinsky
Copy link
Contributor

vogloblinsky commented Sep 2, 2018

Wait a little the next version, which will support Stencil and Nest projects, which are very similar using Decorators for properties and methods.
I think during next 2 weeks.
If you have a reference of an open-source application build with Stencil, it could be nice for me for adding it inside the unit tests of Compodoc.
Thanks

@napolev
Copy link
Author

napolev commented Sep 2, 2018

The Stencil development team created two starter projects, depending on the needs of the developers:

  1. Component starter:
    https://github.com/ionic-team/stencil-component-starter

  2. Application starter:
    https://github.com/ionic-team/stencil-app-starter

I think the Component starter is more interesting because its versatility. I mean, you can use Stencil web components anywhere.

Here you have 5 open-source demo applications done with Stencil:
https://stenciljs.com/demos/

In my opinion I think it would be very interesting, start with the most simple scenario, which is at the same time the most versatile and it is, the Component starter. You could create a dummy project based on it, create some custom web components like the ones you have on my repository and then test your great tool with that.

I can't wait until you have your Compodoc tool ready for Stencil.

Thanks for your great job.

@vogloblinsky vogloblinsky added this to the 1.2.0 milestone Sep 3, 2018
@vogloblinsky vogloblinsky changed the title [FEATURE] - StencilJS support [FEATURE] - StencilJS projects support Sep 3, 2018
@vogloblinsky vogloblinsky removed this from the 1.2.0 milestone Feb 23, 2019
@lock
Copy link

lock bot commented Sep 30, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants