A number of the web frameworks need to have their .js files placed within a specific directory structure. For example, Meteor makes a distinction between code placed in the /client directory and the /server directory.
-- In the very short term, we could write some scripts that move specific .js files into the appropriate folders, as soon as they change, but what would be much better is something like:
Object subclass: #MyClass path: '/myapp/client' instanceVariableNames:'' ... The compiler would then put the code in the appropriate folder, and Meteor etc. could just carry on serenely without realising that anything was going on.
So, possible? Or, very difficult, and likely to break stuff? Cheers Andy ᐧ
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
It's called namespace. ;-)
Andy Burnett <[hidden email]>napísal/a: A number of the web frameworks need to have their .js files placed within a specific directory structure. For example, Meteor makes a distinction between code placed in the /client directory and the /server directory.
-- In the very short term, we could write some scripts that move specific .js files into the appropriate folders, as soon as they change, but what would be much better is something like:
Object subclass: #MyClass path: '/myapp/client' instanceVariableNames:'' ... The compiler would then put the code in the appropriate folder, and Meteor etc. could just carry on serenely without realising that anything was going on.
So, possible? Or, very difficult, and likely to break stuff? Cheers Andy ᐧ
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
I think he’s trying to say that it would be nice to have a default behavior where the namespace is actually the same this a directory path.
Pe 16.04.2014, la 22:18, Herby Vojčík <[hidden email]> a scris: It's called namespace. ;-) You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Exactly :-) I need the files to be written to specific folders. Unless, Herby are you saying that this is what happens already?
-- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Andy Burnett
???
Who is he, me or Andy. Whay I wantedvto tell, is that Amber has that thing called package namespace and so there is already everything to have files grouped in different locations in place (and used, amber files are loaded from different location than your project code). You just need to start to actively use it (that is, have more namespaces if you want to have files in multiple positions) "Mircea S." <[hidden email]>napísal/a: I think he’s trying to say that it would be nice to have a default behavior where the namespace is actually the same this a directory path. Pe 16.04.2014, la 22:18, Herby Vojčík <[hidden email]> a scris: It's called namespace. ;-) You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
That sounds very encouraging :-) Right, I shall go off and learn about how namespaces are implemented/used in Amber. Cheers
ᐧ
On Wed, Apr 16, 2014 at 3:36 PM, Herby Vojčík <[hidden email]> wrote: ??? You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
This requires a section in the doc. I'll start writing a page for that. Nico On Apr 16, 2014 10:12 PM, "Andy Burnett" <[hidden email]> wrote:
--
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
nicolas petton wrote: > This requires a section in the doc. I'll start writing a page for that. As for the motivation for this design decision, two reasons were there: 1. Make loader load packages from multiple locations, to be able to produce libraries and compose project from multiple libraries; 2. AMD modules need to list their dependencies when define()d. Thus, fixed-well-known-namespace-per-save/load-location (that often means, per project / per library) was proposed; and it's deployer's responsibility to map these namespace to actual location where the pieces are actually deployed; deployment does not change naming (important for 2.). (and because namespace is global, it is needed to pick it so it won't have name clashes) -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |