Open ghost opened 8 years ago
I will look into it.
The problem is that riot-ts
actually works only with bower. Mostly I was waiting for this typescript feature of TypeScript 2.0 (hopefully to be released in mid June '16) to make riot-ts
it work with modules.
Thanks @nippur72. I can install it through bower using jspm-bower-endpoint
. That pulls in what you've written. However I can't seem to get your @template decorators working. i admit I am at my limit with all this configuration stuff 🎱
Ok I have figured it all out. I will publish an example in the next couple of days, if anyone is interested.
yes please I am interested, I struggled the whole day trying to make it work. The source of trouble was mostly TypeScript because of its way of handling modules. I hope things will improve with 2.0.
Hi,
I've been struggling to get vscode to recognize the riot object.
Where should I put /// <reference types="riot-typescript" /> /// <reference path="node_modules/riot-typescript/riot.global.d.ts" />
if I put my source in src/
and am building to build/
?
I've been following https://medium.com/@fay_jai/getting-started-with-reactjs-typescript-and-webpack-95dcaa0ed33c#.icl9kama2 more or less replacing react for riot-ts and am getting there (I can build and run my app) but vscode doesn't recognize the riot
object. Any help is welcome, thanks for your work!
@icarito I actually installed a custom riot-ts typing for typings, that points to nippur's version of the riot-ts typing. Take a look at http://stackoverflow.com/questions/37641960/typescript-how-to-define-custom-typings-for-installed-npm-package
My typings file:
{
"globalDependencies": {
...
"riot-ts": "file:typings/custom/riot-ts.d.ts",
"riotjs": "registry:dt/riotjs#0.0.0+20160316155526",
...
},
...
}
You should only have to include the typings once in your main bundle, all other modules should "see" the references. Disclaimer: I am not using webpack, I am using browserify via gulp laravel ( hell of a lot easier )
Good luck!
@icarito I just pushed a PR to the examples repo with a working webpack example. /cc @sidouglas
@sandrokeil thank you a lot, as I learn I will try to be helpful in any way I can!
@sidouglas thanks for your help as well! you sent me looping in another round of tooling uncertainty, for now I'll stick to webpack but I appreciate you sharing your experience!
@icarito yes stick to webpack for new projects. Laravel Elixir now supports webpack, so at some stage I will change over.
Related stackoverflow question: http://stackoverflow.com/questions/37535057/riotts-riot-ts-and-jspm-anyone-got-it-working-together