How to use config.js

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use config.js

laci
I have installed the latest release "amber-0.13.0-alpha.2", which is using config.js instead of amber.js to set up require paths.

It doesn't work because the absolute path is missing.
Please give some hint how to use this approach.
Reply | Threaded
Open this post in threaded view
|

Re: How to use config.js

Herby Vojčík
I don't understand the part with "absolute path".

Migrating existing projects to 0 13 is not recommended yet, at least until some migration guide is written. Creating new projects using `amber init` with 0.13 amber-cli is encouraged, though, as is exploring amber itself and/or helios repos at master, where they use config.js successfully.

If you want to migrate anyway, you should create local.amd.json file in root of your project, which should contain the mappings you have in require.config call in your index.html and remove that call completely. Then issuing `amber config` assembles config.js from .amd.json files it finds (your local.amd.json plus ones it finds in libraries (amber, helios).

Herby

P.S.: mkroehnert did successfully managed to migrate one of ita projects, you may ask him if you find him online at irc.

P.P.S.: Talking about Helios, it is not part of Amber anymore. Your project must include it as dev-dependency (bower install helios --save-dev; amber-init-createf projects include it this way from the start) and then `amber config` incorporates its mappings so `...popupHelios()` finda and runs it.

laci <[hidden email]>napísal/a:

>I have installed the latest release "amber-0.13.0-alpha.2", which is using
>config.js instead of amber.js to set up require paths.
>
>It doesn't work because the absolute path is missing.
>Please give some hint how to use this approach.
>
>
>
>--
>View this message in context: http://forum.world.st/How-to-use-config-js-tp4771191.html
>Sent from the Amber Smalltalk mailing list archive at Nabble.com.
>
>--
>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.
Reply | Threaded
Open this post in threaded view
|

Re: How to use config.js

laci
I meant the path captured in variable amber_home of amber.js.
Reply | Threaded
Open this post in threaded view
|

Re: How to use config.js

Herby Vojčík
laci wrote:
> I meant the path captured in variable amber_home of amber.js.

??? It is thing of the past. It has no meaning in 0.13 at all.
You should do as written in the mail. Have local.amd.json file, use `amber config`, forget the rest.

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: How to use config.js

Sean P. DeNigris
Administrator
In reply to this post by Herby Vojčík
Herby Vojčík wrote
P.S.: mkroehnert did successfully managed to migrate one of ita projects, you may ask him if you find him online at irc.
I ported a project by:
1. Cloning the Amber 0.12 based code
2. Doing an `amber init` with 0.13
3. Copying/adapting the relevant parts from #2 to #1

I'm keeping the result in an Amber13 branch of #1, just in case I run into problems, but so far everything's groovy, and I was able to use the r.js optimizer on my deployed project. HTH.
Cheers,
Sean