Development component which do AMD-like thing

112 views
Skip to first unread message

smagch

unread,
Sep 20, 2012, 9:48:50 AM9/20/12
to compo...@googlegroups.com
I just watch the screen cast. I am really excited about the project.
I have a question.
Should I build each time when I'm developing a component?
I'll be fine with watching a file. But I think it's nice to debug separated code rather than concatenated one since we have really great dev tool.
It sounds silly, but I suppose it'll be handy to have AMD-like script insertion for development.

vision media [ Tj Holowaychuk ]

unread,
Sep 20, 2012, 11:43:33 AM9/20/12
to compo...@googlegroups.com
for right now it needs to be built each time, I do this:

$ watch make &

and then work on things, when I'm done I just do:

$ fg

to bring watch back into the foreground

--
You received this message because you are subscribed to the Google Groups "component" group.
To unsubscribe from this group, send email to componentjs...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

smagch

unread,
Sep 20, 2012, 10:44:58 PM9/20/12
to compo...@googlegroups.com, t...@vision-media.ca
Thanks for the tip!

It seems `component-ls` is just reading `./components` directory.
It might be nice to have a option which output JavaScripts in dependencies resolved order.

```
$ component ls

./components/component-emitter/index.js
./components/component-jquery/index.js
./components/component-pager/template.js
./components/component-pager/index.js
```
And then comment out `build.js`
```
<script src='path-to-component-require.js'></script>
<script src='./components/component-emitter/index.js'></script>
<script src='./components/component-jquery/index.js'></script>
<script src='./components/component-pager/template.js'></script>
<script src='./components/component-pager/index.js'></script>

<script src='./index.js'></script>
<!-- <script src='/build/build.js></script> -->
```

This is not really sophisticated approach though. I just wonder how component development is going to be.
Handy development environment will be necessary in order to grow community though it won't be priority at the moment.

vision media [ Tj Holowaychuk ]

unread,
Sep 20, 2012, 11:14:44 PM9/20/12
to compo...@googlegroups.com
it would be pretty difficult to do that in some cases since several things could depend on emitter etc. Personally I dont think it's worth it, it would take more work to set that up for your dev env than it would be to just do:

$ watch make &

once you background that you dont even notice there's a build step at all

smagch

unread,
Sep 20, 2012, 11:51:14 PM9/20/12
to compo...@googlegroups.com, t...@vision-media.ca
Ah, I got it. I just tried and it doesn't work and I understand why.
My point was that it would be a bit painful to debug concatenated build.js.
Thanks anyway.

vision media [ Tj Holowaychuk ]

unread,
Sep 21, 2012, 12:01:51 AM9/21/12
to compo...@googlegroups.com
ah I see. I dont think it changes much personally, once you click the link to see where the error is in code it's obvious where things went wrong, but that's still a valid argument, it doesn't help debugging that's for sure. I'll add source map support soonish too

smagch

unread,
Sep 21, 2012, 12:13:39 AM9/21/12
to compo...@googlegroups.com, t...@vision-media.ca
SOURCE MAP!
I've never thought about such cutting-edge solution. I've been taking it for just CoffeeScript people. Source map will be a sweet solution.

Sankar Gorthi

unread,
Sep 13, 2013, 5:23:54 PM9/13/13
to compo...@googlegroups.com, t...@vision-media.ca
+1

Any word on what the status of this is?

Sankar Gorthi

unread,
Sep 13, 2013, 5:26:22 PM9/13/13
to compo...@googlegroups.com, t...@vision-media.ca
Reply all
Reply to author
Forward
0 new messages