jerome Posted February 12, 2015 Share Posted February 12, 2015 Hello, BJS is coded in TS.So, I you want to contribute you have to push some valid TS code. Meaning some TS you can compile to JS and test in your browser. Having a working environment may be sometimes a mess to set rightly depending on your own system. Please report here what really working environment you are using to produce valid TS and compile it to running JS.Please also, read first previous posts so you won't reproduce a case already described by someone else before. You could fill in this pattern to report : OS : name, version ex : Windows 7 Pro 64bnodejs : version or n/a ex : 0.10.25 (command line type "nodejs -v" to get it)npm : version or n/a ex : 1.4.28 (command line type "npm -v" to get it)tsc : version or n/a ex : 1.4.1.0 (command line type "tsc -v" to get it)gulp : version or n/a ex : 3.8.10 (command line type "gulp -v" to get it)gulp-tsc : version or n/a ex : 0.9.2 (command line type "npm list gulp-tsc to get it) Editor or IDE : name, version, and/or plugin name , version Feel free to add any other pertinent informations and to link your post to a new tuto page "How to set up with OS / IDE". Please report only really working environments in this thread. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted February 12, 2015 Share Posted February 12, 2015 I use the planatir Plugin to Eclipse (4.4.1) as an editor for TS files. Eclipse also handles git / GitHub (fetch / merge / pushing branch to GitHub fork). For repository historical searches / diffs, I use Netbeans 8. I use Gulp for building, however. OSes: Ubuntu 14.04 LTS, OSX (multiple versions)/usr/local/bin/node -v: v0.10.31npm -v: 1.4.23gulp -v: CLIVersion 3.8.7, Local version 3.8.8npm list gulp-tsc: 0.9.2 Quote Link to comment Share on other sites More sharing options...
jerome Posted February 12, 2015 Author Share Posted February 12, 2015 thank youthe most important to compile : what is your tsc version ? (tsc -v) Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted February 12, 2015 Share Posted February 12, 2015 thank youthe most important to compile : what is your tsc version ? (tsc -v)I get command not found for tsc -v, never heard of it. Quote Link to comment Share on other sites More sharing options...
jerome Posted February 12, 2015 Author Share Posted February 12, 2015 aargI thought gulp-tsc relied on the installed tsc compiler.I just can't imagine the gulp-tsc plugin developers have recoded some typescript compiler from scratch. At last maybe the typescript version ? npm list typescript Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted February 12, 2015 Share Posted February 12, 2015 npm list typescript: 1.0.1 Quote Link to comment Share on other sites More sharing options...
jerome Posted February 12, 2015 Author Share Posted February 12, 2015 Thank youAs RaananW suspects, this is really a compiler version problem : BJS can't be compiled with current TS version. Works for you with TS 1.0.1 or RaananW's 1.0.3Doesn't work for me and others with TS 1.4.1 Quote Link to comment Share on other sites More sharing options...
jahow Posted February 13, 2015 Share Posted February 13, 2015 OS: Windows 7nodejs: 0.10.33npm: 1.4.28tsc: 1.1.0.1 I don't have gulp yet (will need it if I want to contribute more than one line PRs...) I code in TS with SublimeText 3 & a package called T3S: https://github.com/Railk/T3S, and I use a custom build script as follow: { "cmd": ["tsc","$file"], "file_regex": "(.*\\.ts?)\\s\\(([0-9]+)\\,([0-9]+)\\)\\:\\s(...*?)$", "selector": "source.ts", "working_dir": "$project_path", "windows": { "cmd": ["tsc.cmd", "$file"] }} jerome 1 Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 13, 2015 Share Posted February 13, 2015 I pushed two changes that hopefully will make this unneeded. Typescript 1.4 will be supported, gulp will also be updated. At the moment only 1.0.? versions are supported due to small changes in ts's lib.d.ts jerome 1 Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 13, 2015 Share Posted February 13, 2015 BTW - tsc -version won't work if you don't have typescript globally installed. gulp-tsc installs typescript locally (and not as a global application).So, if you don't have the tsc command, you probably have 1.4 as gulp-tsc installs the latest version. Quote Link to comment Share on other sites More sharing options...
jerome Posted February 13, 2015 Author Share Posted February 13, 2015 RaananW, our savior Actually, if you achieve to integrate this adaptative environment behavior in the gulp tasks, you will then hide us all this unneeded complexity layer (setting up each tool version) and keep us only the benefits of the TS language.Very very smart You know, we all don't want to care if the very last TS version is BJS compliant or what TS version we should downgrade to just to compile a small change in the code.Or when change it if TS compiler changes. (In brief, all what rejected Rich Pasher Davey from TS) All we need is to have the right functional working platform up to date for hacking or coding BJS fun Sincerely RaananW, if you achieve this, I'll be the gladest guy ever and the first to mark this topic as definetly useless/answered/cleared/deleted/blazed/nuked Temechon 1 Quote Link to comment Share on other sites More sharing options...
jerome Posted February 13, 2015 Author Share Posted February 13, 2015 Let us know please when your PR is accepted Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 14, 2015 Share Posted February 14, 2015 Done my friends! Quote Link to comment Share on other sites More sharing options...
jerome Posted February 17, 2015 Author Share Posted February 17, 2015 Ok, I reactive this topic only as example purpose. I use :OS : linux ubuntu 14.04node : 0.12.0 my nodejs is updated with the n npm module which can maintain a stable nodejs installationnpm : 2.5.1tsc : 1.4.1.0these are global installations, maybe the eventual local installations may differ (more updated). I (mis)use Eclipse (luna) because I'm not a great fan of heavy IDE (pleonasm). I tested TypEsc typescript plugin, probably nice, but gave it up because I just couldn't find doc/tuto/wiki to set it up well.I just tried Palantir typescript plugin and faced some artefacts (false syntaxic errors underlined in the code). I surely mis-use it too for now. Reading some tuto would help.Didn't test the embedded eclipse git interface but just the branch switch. I also use (when upset with Eclipse) Sublime Text 2 with T3S typescript plugin. Well, not an IDE but still one of the best editor ever.Works fast and well (better than Eclipse regarding the pure code edition). Manages as well the .d.ts files once they are declared in the beginning of the ts files. I'm still forcing me to use an IDE (why ?) and try to bite the bullet to set up and to master every embedded tool : git, builder, etc.But I have to confess I feel attracted back to Sublime Text. Question of opinion (or laziness ?). I use (making big mistakes) git in command line.I compile or build with gulp in command line too. The very important point, especially for Linux users, is to get the latest gulpfiles fixed by RaananW.He really fixed a lot of bugs which made me waste a lot of time (and hair), some tiny things that bevahe differently in Windows than in Linux, so Windows guys just couldn't see them (compiler version error, dependency missing, filename case sensivity, etc).Again many thanks to him . So if you are a linux guy like me feeling quite reticent about big IDE and if you aren't afraid with command line terminal, you could easily use :- your favorite editor with its TS plugin- git command line (just beware when juggling with branches, commit, fetches, etc)- latest bjs gulpfile and gulp Quote Link to comment Share on other sites More sharing options...
jerome Posted February 19, 2015 Author Share Posted February 19, 2015 Addendum :For linux users (maybe others also), I installed the git GUI client SmartGit which could help to deal with git/github and make less manual errors (I hope).For Sublime Text users, I just installed via package control (two clicks) the ST git pluggin : https://github.com/kemayo/sublime-text-git Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted February 19, 2015 Share Posted February 19, 2015 While not likely for a few years, I see a future where the browser can do this compiling of Typescript for you. (There is a type attribute on the script tag). Since it is directly convertible to Javascript, it could be interspersed with it. Then, hopefully Javascript will become the 'Latin' of the Internet. Right now things are a little messy, with editors requiring Node and such. Quote Link to comment Share on other sites More sharing options...
jerome Posted January 9, 2016 Author Share Posted January 9, 2016 BTW, I'm still on Ubuntu 14, but I just switched this week from SublimeText 2 to the editor Atom which is really great for coding javascript/typescript. I think I will keep atom then :- cobalt theme (I like it from years, that's why I didn't keep VSCode)... coders are so conservative with their beloved environment sometimes ;-)- internal and easy package (plug-in) manager- native easy git integration/visualization- easy TS auto-completion working out-of-the box- etc : classic other features of modern code editors The reason I left ST2 is that atom was as easy as it, has the cobalt theme, but better TS completion and git feature and seem a bit more stable for now (no "Python couldn't do that" message from time to time) Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted January 9, 2016 Share Posted January 9, 2016 Oh bloody hell !!! Their introducing video is the best I've ever seen !!! Quote Link to comment Share on other sites More sharing options...
jerome Posted January 9, 2016 Author Share Posted January 9, 2016 yep funny Quote Link to comment Share on other sites More sharing options...
iiceman Posted January 9, 2016 Share Posted January 9, 2016 That video... that's so awesome! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.