Hello
I have a question regarding the construction of a proper index.html file for deployment in version version 0.13-pre A. I created a project with amber init B. I created a test class Amber013TestA with a class method startUp 'body' asJQuery append: 'hello'. C. I create the all-in-1.js with node r.js -o app.build.js (I copied r.js into the project directory) D. I have a index.html file which is copied in below. I start the server with amber serve and point the browser to http://localhost:4000/index.html I expect a web page with only the word 'hello' on it. E. I get a blank web page and I get the following error messages in the console 10:38:24.870 GET http://localhost:4000/index-all.html [HTTP/1.1 200 OK 2ms] 10:38:24.871 GET http://localhost:4000/all-in-1.js [HTTP/1.1 200 OK 5ms] 10:38:24.811 SyntaxError: Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead all-in-1.js:52 10:38:24.841 Error: http://localhost:4000/all-in-1.js is being assigned a //# sourceMappingURL, but already has one 10:38:24.951 Unknown property 'box-sizing'. Declaration dropped. index-all.html 10:38:25.003 TypeError: smalltalk is undefined index-all.html:17 What am I missing? --Hannes ------------------------------------------------------------------------------------------------------------------ index.html file for deployment of Amber app ------------------------------------------------------------------------------------------------------------------ <!DOCTYPE html> <html> <head> <title>Amber 0.13 Test A</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="author" content="" /> <script type='text/javascript' src='all-in-1.js'></script> </head> <body> <script type='text/javascript'> require([ 'amber-amber013testa/Amber013TestA', ], function (smalltalk) { //used for all new packages in IDE smalltalk.initialize({ 'transport.defaultAmdNamespace': "amber-amber013testa" }); smalltalk.globals.Amber013TestA._startUp(); }); </script> </body> </html> -- 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. |
Why did you remove 'amber/devel' or 'amber/deploy' from the require(...)
call? The require call have no reason to be changed (other rhan replacing 'amber/devel' with 'amber/deploy' and not running IDE in the callback), it should be otherwise identical to what you have in development. H. Hirzel wrote: > Hello > > I have a question regarding the construction of a proper index.html > file for deployment in version version 0.13-pre > > A. > I created a project with > > amber init > > B. > I created a test class > Amber013TestA > > with a class method > > startUp > > 'body' asJQuery append: 'hello'. > > > C. > I create the all-in-1.js with > > node r.js -o app.build.js > > (I copied r.js into the project directory) > > > D. > I have a index.html file which is copied in below. > > I start the server with > > amber serve > > and point the browser to > > http://localhost:4000/index.html > > I expect a web page with only the word 'hello' on it. > > E. > I get a blank web page and > I get the following error messages in the console > > 10:38:24.870 GET http://localhost:4000/index-all.html [HTTP/1.1 200 OK > 2ms] > 10:38:24.871 GET http://localhost:4000/all-in-1.js [HTTP/1.1 200 OK 5ms] > 10:38:24.811 SyntaxError: Using //@ to indicate sourceMappingURL > pragmas is deprecated. Use //# instead all-in-1.js:52 > 10:38:24.841 Error: http://localhost:4000/all-in-1.js is being > assigned a //# sourceMappingURL, but already has one > 10:38:24.951 Unknown property 'box-sizing'. Declaration dropped. > index-all.html > 10:38:25.003 TypeError: smalltalk is undefined index-all.html:17 > > > What am I missing? > > --Hannes > > > ------------------------------------------------------------------------------------------------------------------ > > > > index.html file for deployment of Amber app > ------------------------------------------------------------------------------------------------------------------ > > > > > <!DOCTYPE html> > <html> > > > <title>Amber 0.13 Test A</title> > <meta http-equiv="content-type" content="text/html; charset=utf-8" /> > <meta name="author" content="" /> > <script type='text/javascript' src='all-in-1.js'></script> > </head> > > <body> > <script type='text/javascript'> > require([ > 'amber-amber013testa/Amber013TestA', > ], function (smalltalk) { > //used for all new packages in IDE > smalltalk.initialize({ > 'transport.defaultAmdNamespace': "amber-amber013testa" > }); > smalltalk.globals.Amber013TestA._startUp(); > }); > </script> > > </body> > > </html> > -- 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 thought the call to my app class is the only one which is needed. In
the sense that in the all-in-1.js everything is included and will be pulled in by the call to my app class. So here is the index.html which now works fine. Thank you for your help. <!DOCTYPE html> <html> <head> <title>Amber 0.13 Test</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script type='text/javascript' src='all-in-1.js'></script> </head> <body> <script type='text/javascript'> require([ 'amber/deploy', 'amber-amber013testa/Amber013TestA', ], function (smalltalk) { //used for all new packages in IDE smalltalk.initialize({ 'transport.defaultAmdNamespace': "amber-amber013testa" }); smalltalk.globals.Amber013TestA._startUp(); }); </script> </body> </html> On 9/11/14, Herby Vojčík <[hidden email]> wrote: > Why did you remove 'amber/devel' or 'amber/deploy' from the require(...) > call? > > The require call have no reason to be changed (other rhan replacing > 'amber/devel' with 'amber/deploy' and not running IDE in the callback), > it should be otherwise identical to what you have in development. > > H. Hirzel wrote: >> Hello >> >> I have a question regarding the construction of a proper index.html >> file for deployment in version version 0.13-pre >> >> A. >> I created a project with >> >> amber init >> >> B. >> I created a test class >> Amber013TestA >> >> with a class method >> >> startUp >> >> 'body' asJQuery append: 'hello'. >> >> >> C. >> I create the all-in-1.js with >> >> node r.js -o app.build.js >> >> (I copied r.js into the project directory) >> >> >> D. >> I have a index.html file which is copied in below. >> >> I start the server with >> >> amber serve >> >> and point the browser to >> >> http://localhost:4000/index.html >> >> I expect a web page with only the word 'hello' on it. > >> >> E. >> I get a blank web page and >> I get the following error messages in the console >> >> 10:38:24.870 GET http://localhost:4000/index-all.html [HTTP/1.1 200 OK >> 2ms] >> 10:38:24.871 GET http://localhost:4000/all-in-1.js [HTTP/1.1 200 OK 5ms] >> 10:38:24.811 SyntaxError: Using //@ to indicate sourceMappingURL >> pragmas is deprecated. Use //# instead all-in-1.js:52 >> 10:38:24.841 Error: http://localhost:4000/all-in-1.js is being >> assigned a //# sourceMappingURL, but already has one >> 10:38:24.951 Unknown property 'box-sizing'. Declaration dropped. >> index-all.html >> 10:38:25.003 TypeError: smalltalk is undefined index-all.html:17 >> >> >> What am I missing? >> >> --Hannes >> >> >> ------------------------------------------------------------------------------------------------------------------ >> >> >> >> index.html file for deployment of Amber app >> ------------------------------------------------------------------------------------------------------------------ >> >> >> >> >> <!DOCTYPE html> >> <html> >> >> > <head> >> <title>Amber 0.13 Test A</title> >> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> >> <meta name="author" content="" /> >> <script type='text/javascript' src='all-in-1.js'></script> >> </head> >> >> <body> >> <script type='text/javascript'> >> require([ >> 'amber-amber013testa/Amber013TestA', >> ], function (smalltalk) { >> //used for all new packages in IDE >> smalltalk.initialize({ >> 'transport.defaultAmdNamespace': "amber-amber013testa" >> }); >> smalltalk.globals.Amber013TestA._startUp(); >> }); >> </script> >> >> </body> >> >> </html> >> > > -- > 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. |
The all-in-1.js just contains everything. It would be strange if it actually loaded anything (if it did, why didn't it load your app as well?).
The require call is always needed to actually get the modules to start. This should not be coupled to the fact how were they loaded/defined (all-in-1 or file by file). H. Hirzel wrote: > I thought the call to my app class is the only one which is needed. In > the sense that in the all-in-1.js everything is included and will be > pulled in by the call to my app class. > > So here is the index.html which now works fine. Thank you for your help. > > <!DOCTYPE html> > <html> > > <head> > <title>Amber 0.13 Test</title> > <meta http-equiv="content-type" content="text/html; charset=utf-8" /> > <script type='text/javascript' src='all-in-1.js'></script> > </head> > > <body> > <script type='text/javascript'> > require([ > 'amber/deploy', > 'amber-amber013testa/Amber013TestA', > > //used for all new packages in IDE > smalltalk.initialize({ > 'transport.defaultAmdNamespace': "amber-amber013testa" > }); > smalltalk.globals.Amber013TestA._startUp(); > }); > </script> > > </body> > > </html> > > On 9/11/14, Herby Vojčík<[hidden email]> wrote: >> Why did you remove 'amber/devel' or 'amber/deploy' from the require(...) >> call? >> >> The require call have no reason to be changed (other rhan replacing >> 'amber/devel' with 'amber/deploy' and not running IDE in the callback), >> it should be otherwise identical to what you have in development. >> >> H. Hirzel wrote: >>> Hello >>> >>> I have a question regarding the construction of a proper index.html >>> file for deployment in version version 0.13-pre >>> >>> A. >>> I created a project with >>> >>> amber init >>> >>> B. >>> I created a test class >>> Amber013TestA >>> >>> with a class method >>> >>> startUp >>> >>> 'body' asJQuery append: 'hello'. >>> >>> >>> C. >>> I create the all-in-1.js with >>> >>> node r.js -o app.build.js >>> >>> (I copied r.js into the project directory) >>> >>> >>> D. >>> I have a index.html file which is copied in below. >>> >>> I start the server with >>> >>> amber serve >>> >>> and point the browser to >>> >>> http://localhost:4000/index.html >>> >>> I expect a web page with only the word 'hello' on it. >>> E. >>> I get a blank web page and >>> I get the following error messages in the console >>> >>> 10:38:24.870 GET http://localhost:4000/index-all.html [HTTP/1.1 200 OK >>> 2ms] >>> 10:38:24.871 GET http://localhost:4000/all-in-1.js [HTTP/1.1 200 OK 5ms] >>> 10:38:24.811 SyntaxError: Using //@ to indicate sourceMappingURL >>> pragmas is deprecated. Use //# instead all-in-1.js:52 >>> 10:38:24.841 Error: http://localhost:4000/all-in-1.js is being >>> assigned a //# sourceMappingURL, but already has one >>> 10:38:24.951 Unknown property 'box-sizing'. >>> index-all.html >>> 10:38:25.003 TypeError: smalltalk is undefined index-all.html:17 >>> >>> >>> What am I missing? >>> >>> --Hannes >>> >>> >>> ------------------------------------------------------------------------------------------------------------------ >>> >>> >>> >>> index.html file for deployment of Amber app >>> ------------------------------------------------------------------------------------------------------------------ >>> >>> >>> >>> >>> <!DOCTYPE html> >>> <html> >>> >>> >> <head> >>> <title>Amber 0.13 Test A</title> >>> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> >>> <meta name="author" content="" /> >>> <script type='text/javascript' src='all-in-1.js'></script> >>> </head> >>> >>> <body> >>> <script type='text/javascript'> >>> require([ >>> 'amber-amber013testa/Amber013TestA', >>> ], function (smalltalk) { >>> //used for all new packages in IDE >>> smalltalk.initialize({ >>> 'transport.defaultAmdNamespace': >>> }); >>> smalltalk.globals.Amber013TestA._startUp(); >>> }); >>> </script> >>> >>> </body> >>> >>> </html> >>> >> -- >> 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. |
Free forum by Nabble | Edit this page |