Hmm - what happens if you change directory to the root of the QxCompiler repo 
and run ./test/compile-app-demo.js?

From:  Dimitri <mi...@cargosoft.ru>
Reply-To:  qooxdoo Development <qooxdoo-devel@lists.sourceforge.net>
Date:  Wednesday, 17 February 2016 at 22:31
To:  <qooxdoo-devel@lists.sourceforge.net>
Subject:  Re: [qooxdoo-devel] QxCompiler - add ES6, faster compilation, and 
100% Javascript API to building applications

No cigar this time :-\

[mitya@localhost test]$ ./compile-app-demo.js 
/home/mitya/qxcompiler/node_modules/babel-core/lib/transformation/file/options/option-manager.js:393
          throw new Error("Couldn't find preset " + JSON.stringify(val) + " 
relative to directory " + JSON.stringify(dirname));
          ^

Error: Couldn't find preset "es2015" relative to directory "/home/mitya"
    at 
/home/mitya/qxcompiler/node_modules/babel-core/lib/transformation/file/options/option-manager.js:393:17
    at Array.map (native)
    at OptionManager.resolvePresets 
(/home/mitya/qxcompiler/node_modules/babel-core/lib/transformation/file/options/option-manager.js:385:20)
    at OptionManager.mergePresets 
(/home/mitya/qxcompiler/node_modules/babel-core/lib/transformation/file/options/option-manager.js:369:10)
    at OptionManager.mergeOptions 
(/home/mitya/qxcompiler/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328:14)
    at OptionManager.addConfig 
(/home/mitya/qxcompiler/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:10)
    at OptionManager.findConfigs 
(/home/mitya/qxcompiler/node_modules/babel-core/lib/transformation/file/options/option-manager.js:434:16)
    at OptionManager.init 
(/home/mitya/qxcompiler/node_modules/babel-core/lib/transformation/file/options/option-manager.js:482:12)
    at File.initOptions 
(/home/mitya/qxcompiler/node_modules/babel-core/lib/transformation/file/index.js:211:75)
    at new File 
(/home/mitya/qxcompiler/node_modules/babel-core/lib/transformation/file/index.js:129:22)

Dunno why it looks for presets in my home dir. In my previous experiment, 
everything went smooth (except that it didn't in fact collect any qooxdoo deps, 
since I removed all plugins - but transpiling itself went fine).

As for uglify - ah, that was stupid. I used original uglify, not uglify-js. 
Just tried the latter (2.6.1) - indeed, it takes ~10 secs for qxt. Not bad.

В Ср, 17/02/2016 в 20:56 +0000, John Spackman пишет:
Got it – it was a bug in my plugin I introduced a while ago, but Chrome 
obviously supports arrow functions natively so I didn’t pick up that the 
translation wasn’t happening any more.  The .babelrc is not needed for this 
because we’re using it embedded, I think the .babelrc is only for the CLI

That’s very a good point about the polypill BTW because it’s not being included 
and it should be, I’ll add that in tomorrow.

The problem with translations is fixed now too, sorry about that I should have 
deleted the output directory before retesting :oops:

What options are you running Uglify with, and what version are you running?  
I’m using "uglify boot.js -m -c”, I just timed it on mine and it’s mangled the 
qxt app in 11 seconds (I’m using uglify 2.6.1)  Still not great but better than 
30 secs :)  I’ve nearly got Uglify done, but stopped for dinner and then saw 
your email so switched back.

I’ve done the #! entries too

I’ve pushed a new release, give it a go :)

John

From:  Dimitri <mi...@cargosoft.ru>
Reply-To:  qooxdoo Development <qooxdoo-devel@lists.sourceforge.net>
Date:  Wednesday, 17 February 2016 at 19:33
To:  <qooxdoo-devel@lists.sourceforge.net>
Subject:  Re: [qooxdoo-devel] QxCompiler - add ES6, faster compilation, and 
100% Javascript API to building applications

Just a quick follow-up on Babel - I've rolled back to yesterday's version, 
edited lib/qxcompiler/ClassFile.js:218, replaced that plugins array with 
presets: [ "es2015" ]. Suddenly, it worked :)
I'm still wondering why it doesn't try to look for any .babelrc file. It's 
clearly stated in the docs that the "babelrc" option is true by default. And it 
definitely would be good to have control over Babel via (optional) config file.

Another issue to consider is that not every ES6 feature is implemented via code 
transformation. Some (ex., Promises) require babel-polyfill. (Mention in the 
docs? Integrate polyfill into build?)

Dimitri

Hi John,

That pace you're keeping, it's incredible :) Glad to hear translations finally 
landed!

Unfortunately, I couldn't make them work :(

[mitya@localhost test]$ node compile-app-demo.js 
[BABEL] Note: The code generator has deoptimised the styling of 
"/home/mitya/qxcompiler/qooxdoo/framework/source/class/qx/ui/core/Widget.js" as 
it exceeds the max of "100KB".
2016-02-17 21:30:13.229 [info ] makers          Writing target Source Target: 
../testdata/qxt/source-output/
/home/mitya/qxcompiler/lib/qxcompiler/targets/Target.js:239
              pkgdata.locales["C"] = db.cldr["en"];
                                            ^

TypeError: Cannot read property 'en' of undefined
    at /home/mitya/qxcompiler/lib/qxcompiler/targets/Target.js:239:45
    at /home/mitya/qxcompiler/node_modules/async/lib/async.js:718:13
    at async.forEachOf.async.eachOf 
(/home/mitya/qxcompiler/node_modules/async/lib/async.js:233:13)
    at _parallel (/home/mitya/qxcompiler/node_modules/async/lib/async.js:717:9)
    at Object.async.parallel 
(/home/mitya/qxcompiler/node_modules/async/lib/async.js:731:9)
    at /home/mitya/qxcompiler/lib/qxcompiler/targets/Target.js:236:15
    at /home/mitya/qxcompiler/lib/util.js:321:9
    at /home/mitya/qxcompiler/node_modules/async/lib/async.js:52:16
    at /home/mitya/qxcompiler/node_modules/async/lib/async.js:269:32
    at /home/mitya/qxcompiler/node_modules/async/lib/async.js:44:16

(removed qxcompiler dir & did clean checkout, didn't help either)

Re: Babel - sadly, didn't make it work either :( that arrow function in 
qxt/Application.js goes unchanged first to [source|build]-output/transpiled, 
then to [source|build]-output/script. The same with string templates, etc. Note 
the above [BABEL] message - that means, Babel is invoked, but doesn't apply any 
actual transformations. I tried "strace -e trace=open node 
compile-app-demo.js", and didn't see it open .babelrc or any plugin and/or 
preset modules. Could you please make sure it's indeed enabled? If it works for 
you, could you please assist me in tracing/debugging (since I'm a newbie in a 
Node world)?

As for script compression, I played a bit with the standalone uglify tool. 
Works pretty fine, but it takes ~30 seconds to process a skeleton app. Do you 
think it can be sped up if integrated into QxCompiler?

Minor issue: test/*.js scripts could have a shebang string (#!/usr/bin/node) 
and +x mode so that they could be run directly, without typing "node ..." each 
time.

Cheers!
Dimitri
------------------------------------------------------------------------------ 
Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + 
Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end 
web transactions and take corrective actions now Troubleshoot faster and 
improve end-user experience. Signup Now! 
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140_______________________________________________
 qooxdoo-devel mailing list 
qooxdoo-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------ 
Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + 
Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end 
web transactions and take corrective actions now Troubleshoot faster and 
improve end-user experience. Signup Now! 
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140_______________________________________________
 qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to