The auto-compile is just calling the JavaScript-based compiler on the code 
when the file is saved... Doesn't sound like a lot to implement for a 
plugin... Maybe there are even things one can wire manually in some IDEs, 
like binding the save short-key to a macro that runs a command line in the 
background or something...

TypeScript is extremely new, so broad IDE support is not here yet, but it 
will come soon, I'm sure. In the meantime, I think the TypeScript plugin 
and web-essentials extension, can be installed on the "Express" edition(s) 
of visual studio. And if you still wanna do it in any other IDE, well, 
there's always node.js and running some watcher on it...

I do still think that in general, one should be able to use web2py itself 
as a watcher, that can run transpilers/minifiers on-save. It should be easy 
enough to wire a new transpiler/minifier to such a watcher, as there are 
many javascript transpilers out there, and new ones seem to be popping up 
every now and then...

Hell, someone could write a plugin/app for web2py that runs unit-tests via 
some library (jasmin, qunit or whatever,,,) It could be a full-stack CI 
system, kinda like yeoman...
There is a growing need for such things as more logic is being developed 
in(and/or moved to) the client side. The "Single-Page-Apps" era has arrived, 
and web2py should adapt. It was a forerunner a few years back, and it 
should stay on the edge of innovation, or at the very least keep up with 
the trends.

On Wednesday, December 19, 2012 11:53:35 AM UTC-8, Niphlod wrote:
>
> so develop web2py in VS and not in the integrated admin interface :P
>
> I was referring to the fact that there is no python compiler for 
> typescript (other IDE "advertised" have only the syntax highlight feature, 
> not the auto-compile feature)
>
> On Wednesday, December 19, 2012 5:40:31 PM UTC+1, Arnon Marcus wrote:
>>
>> Hmmm, not exactly.
>>
>> You CAN use node for/with it, but there are also IDE plugins.
>> I'm using Visual Studio 2012 (trial) and it compiles-on-save 
>> automatically, with a side-by-side updating javascript target file view. 
>> that is being generated as I save.
>> All the material needed to make such a plugin for any other IDE is 
>> open-sourced, and does not NEED node.js to work at all...
>> It even minimizes my files for me as well (generates another *-min.js 
>> file).
>> I can even configure the compiler in the IDE to also auto-generate 
>> source-maps as it auto-compiles-on-save.
>> This is just another option in the options window of VS, that gets added 
>> when I install the "web-essentials" extension of VS.
>> This is a huge extension, that also provides auto-compilation of 
>> LESS-to-CSS files, and also minifiezes the resulting CSS files as well
>>
>> In a nut-shell:
>>
>> Visual Studio 2012 + TypeScript (plugin) + Web-Essentials (extension) = 
>> Auto-Compilation/Source-Map-Generation/Minification of 
>> TypeScript->JavaScript + LESS->CSS
>> :)
>> All this with ZERO dependencies and without node.js
>> :) :)
>> And I can now debug in Chrome using the original TypeScript files 
>> themselves, using the auto-generated-source-maps-on-save, via the "Use 
>> Source Maps" feature in chrome.
>> :) :) :)
>> I can also use use the LESS files in chrome, by using the "Support for 
>> SASS" feature.
>> :) :) :) :)
>> Adding the LivePage (auto-reload) chrome-extension rounds up the 
>> real-time-feedback-with-transipling experience.
>> :) :) :) :) :)
>> All the above, without web2py or node.js (!)
>>
>> Here is a better video-presentation for TypeScript:
>> http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript
>>
>> Here is how Source-Maps work:
>> http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/
>>
>> LivePage extension:
>>
>> https://chrome.google.com/webstore/detail/livepage/pilnojpmdoofaelbinaeodfpjheijkbh?hl=en
>>
>> On Wednesday, December 19, 2012 5:12:26 PM UTC+2, Niphlod wrote:
>>>
>>> anoher node.js dependancy ^_^
>>>
>>> Il giorno mercoledì 19 dicembre 2012 15:53:45 UTC+1, Arnon Marcus ha 
>>> scritto:
>>>>
>>>> I'm starting to fall in love with TypeScript...
>>>>
>>>> http://www.youtube.com/watch?v=3dqZW_DqHIQ
>>>>
>>>> On Tuesday, December 18, 2012 1:21:33 AM UTC+2, Arnon Marcus wrote:
>>>>>
>>>>> That sounds very cool, thanks for the detailed answered, this makes my 
>>>>> head a little calmer now...
>>>>>
>>>>> BTW, I actually DID mean coffeCup, It refers to the python module 
>>>>> that does coffeeScript-to-javascript transipling.
>>>>>
>>>>> https://github.com/dsc/coffeecup
>>>>>
>>>>> Apparently, it also depends on node...
>>>>>
>>>>> Anyways, I think i'm sarting to lean more towards TypeScript anyways, 
>>>>> so...
>>>>>
>>>>> On Monday, December 17, 2012 2:26:38 PM UTC-8, Niphlod wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Monday, December 17, 2012 2:50:09 PM UTC+1, Arnon Marcus wrote:
>>>>>>>
>>>>>>> Holy shit...
>>>>>>>
>>>>>>> Where did you say you got all that info from?
>>>>>>
>>>>>>
>>>>>> quoted the link and scanning the source code 
>>>>>>  
>>>>>>
>>>>>>> Is this what that module needs?
>>>>>>>
>>>>>>> I thought it's just a stand-alone pythonic-module doing everything...
>>>>>>> Guess I was a bit optimistic...
>>>>>>>
>>>>>>> little bit too much :P
>>>>>>  
>>>>>>
>>>>>>> What about coffeeCup?
>>>>>>>
>>>>>>
>>>>>> meaning coffeescript ? 
>>>>>>  
>>>>>>
>>>>>>> - is it just something like "edit the less file in 
>>>>>>> static/less/file.less and have it recompiled as /static/css/file.css"
>>>>>>> Well, either that and/or sass/scss, as well as coffescript 
>>>>>>> transpiling, with optional minification/zipping for the resaulting 
>>>>>>> js/css, 
>>>>>>> yeah, basically that.
>>>>>>>
>>>>>>
>>>>>> I'm not that much advanced, but as long as there is a "list of 
>>>>>> extensions" that follow the same rule, a contrib script continuosly 
>>>>>> checking for changed files is not hard to do.
>>>>>>  
>>>>>>
>>>>>>> But if there is ANY need for node.js in this kind of solution, than 
>>>>>>> forget it.
>>>>>>>
>>>>>>
>>>>>> I gave you the list of what webasset provide with python modules. I 
>>>>>> think the author researched a lot and resorted to external binaries only 
>>>>>> when needed  
>>>>>>
>>>>>> Is web2py minifying css/js scripts by default? If so, in what 
>>>>>>> circumstances? And since what version?
>>>>>>>
>>>>>>
>>>>>> nope. Web2py includes contrib.minify (containing jsmin and cssmin) 
>>>>>> that is activated by response.optimize_css and response.optimize_js . 
>>>>>> It's 
>>>>>> a feature I think since 1.99.7.
>>>>>>
>>>>>> Gzipping is not done within web2py. Usually that is something done 
>>>>>> only one-time-only before releasing to production and for that there is 
>>>>>> scripts/zip_static_files.py (meant to be run from shell as web2py.py -S 
>>>>>> yourapp -R scripts/zip_static_files.py). It creates automatically .gz 
>>>>>> files 
>>>>>> with the same mtime in order to be recognized as valid replacement by 
>>>>>> apache, nginx & co. Standalone web2py serves automatically gz files in 
>>>>>> the 
>>>>>> static folder with the same mtime without any configuration at all 
>>>>>> (meaning 
>>>>>> that a request for /app/static/js/jquery.js as long as there is a 
>>>>>> /app/static/js/jquery.js.gz with the same mtime will serve the gzipped 
>>>>>> one 
>>>>>> automatically)
>>>>>>
>>>>>>  
>>>>>>
>>>>>

-- 



Reply via email to