ionic-team / stencil-component-starter

Minimal starter project for building shareable web components with Stencil
https://github.com/ionic-team/stencil
MIT License
278 stars 129 forks source link

Stenciljs Starter index.ts to index.d.ts #42

Closed ghost closed 6 years ago

ghost commented 6 years ago

Resources: Before submitting an issue, please consult our docs.

Stencil version: (run npm list @stencil/corerunnpm list @stencil/core` from a terminal/cmd prompt and paste output below):

@stencil/core@0.0.8-9 

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com

Current behavior:

The stencil-component-starter creates a index.ts and a index.d.ts. The issue i found is that the index.ts gets a syntax of

export * from './components';

Rather than the index.d.ts that I think is intended. When I added the export syntax into the index.d.ts it worked...

Steps to reproduce:

Related code:

git clone https://github.com/ionic-team/stencil-component-starter.git my-component
npm install
npm run dev

ry@X1Carbon:~/my-component$ npm run dev

> my-name@0.0.1 dev /home/ry/my-component
> sd concurrent "stencil build --dev --watch" "stencil-dev-server" 

[55:44.9]  @stencil/core v0.0.8-9 
[55:44.9]  build, mycomponent, dev mode, started ... 
[55:44.9]  compile started ... 
[ ERROR ]  tsHost.getSourceFile unable to find /home/ry/my-component/src/index.d.ts 
[ ERROR ]  tsHost.getSourceFile unable to find /home/ry/my-component/src/index.d.ts 
[55:47.8]  compile finished in 2.89 s 

[ ERROR ]  typescript error
           File '/home/ry/my-component/src/index.d.ts' not found. 

[55:47.9]  build failed, watching for changes... in 2.94 s 

Other information:

ghost commented 6 years ago

If you can tell me how to fix this I would Love to dive in and give it a shot! LOVE STENCILJS!!!

jgw96 commented 6 years ago

Hey @Ry10p , do you still get this issue with the latest version of this starter?

ghost commented 6 years ago

@jgw96 it looks to be all cleared up.

Thanks a bunch!