dojo / core

:rocket: Dojo 2 - language helpers and utilities.
http://dojo.io
Other
213 stars 62 forks source link

I just would like to use dojo2 as a library, it looks a little complex, how could I use it like a react or dojo1? #371

Closed renyaoxiang closed 6 years ago

renyaoxiang commented 6 years ago

I would like to use it as a library. I did not find a guide or tutorial. Pleasure to have your some suggestion.

kitsonk commented 6 years ago

The tutorials are located at dojo.io/tutorials.

Is there anything missing there you would expect to help you get started?

kitsonk commented 6 years ago

Question answered, closing.

renyaoxiang commented 6 years ago

@kitsonk Thank you any way.

kitsonk commented 6 years ago

@renyaoxiang did the link to the tutorials not help you?

renyaoxiang commented 6 years ago

Dear @kitsonk Not all. In my case, I would like to use dojo2 sometimes together with react, I found it a bit heavy as said in the tutorials, as it seems that I have to install @dojo/cli. Also I could understand not at all about the @theme in dojo2, while I would like to have a separate less file to gather all styles by browerify, not by webpack, it may occur a error and I have no way I think.

dylans commented 6 years ago

Re-opened as @renyaoxiang does not feel the question was answered.

bitranch commented 6 years ago

First, you don't need @dojo/cli to use dojo2. We use dojo2 in a tool chain that doesn't make use of any of the cli functionality. Based on our experience, @dojo/cli is there to help you get started (and supply a tool chain), but it's not any kind of requirement. If you pull the dojo2 packages from npm, you can use them pretty much as you'd use any other js package.

As for using dojo2, I've found it a lot simpler to include "as a library" than dojo1. We use webpack, so there may be complexities with using it in browserify, but I'd be surprised if dojo2 wasn't still easier to set up and use.

By the way, I'm a dojo2 user and not a committer.

renyaoxiang commented 6 years ago

Dear @bitranch Thank you very much, now I have no puzzlement.

agubler commented 6 years ago

Thank you @bitranch