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

Any chance of getting this working in JSPM? #31

Open
ghost opened this issue May 31, 2016 · 9 comments
Open

Any chance of getting this working in JSPM? #31

ghost opened this issue May 31, 2016 · 9 comments

Comments

@ghost
Copy link

ghost commented May 31, 2016

Related stackoverflow question: http://stackoverflow.com/questions/37535057/riotts-riot-ts-and-jspm-anyone-got-it-working-together

@nippur72
Copy link
Owner

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.

@ghost
Copy link
Author

ghost commented Jun 1, 2016

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 🎱

@ghost
Copy link
Author

ghost commented Jun 2, 2016

Ok I have figured it all out.
I will publish an example in the next couple of days, if anyone is interested.

@nippur72
Copy link
Owner

nippur72 commented Jun 2, 2016

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.

@icarito
Copy link

icarito commented Oct 10, 2016

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!

@sidouglas
Copy link

sidouglas commented Oct 10, 2016

@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!

@sandrokeil
Copy link
Contributor

@icarito I just pushed a PR to the examples repo with a working webpack example. /cc @sidouglas

@icarito
Copy link

icarito commented Oct 11, 2016

@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!

@ghost
Copy link
Author

ghost commented Oct 13, 2016

@icarito yes stick to webpack for new projects. Laravel Elixir now supports webpack, so at some stage I will change over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants