Using Xcode with Javascript/Coffeescript and Titanium? - javascript

I am getting rather annoyed with Titanium Studio so I decided to look for an alternative. I have used many IDEs (such as Aptana, Komodo, Netbeans, TextMate) but they have never seemed to be so streamlined and efficient as Xcode (especially with its Git integration).
So my question is: Is there a way to edit Javascript/Coffeescript files while using the full project interface in Xcode? (most importantly git integration)
(I'm using Xcode 4 with Mac OSX Lion)
Thanks in advance
Fred

I have not done Coffeescript development, but my answer covers how to use Xcode for languages other than C, C++, and Objective-C. Create either an external build system project or an empty project in Xcode. When you create the project, Xcode gives you the option to create a local git repository for the project. If you already have a git repository, you must add the Xcode project file to the repository.
After creating the project, add your files to the project. Xcode 4 has Javascript syntax coloring. If your Javascript files have the file extension .js, Xcode will automatically give you Javascript syntax coloring. I don't know how different Coffeescript is from Javascript, but you can give your Coffeescript files Javascript syntax coloring by choosing Editor > Syntax Coloring > JavaScript.

I'm not sure I understand your question (ie: are you looking for something better than XCode, or just a way to integrate them), but have you looked at IntelliJ IDEA? It has excellent Git integration, one of the best JS editors I've used, and has a plugin for CoffeeScript
If you just want it integrated with XCode, I apologize.

Related

Can't find javascript project in eclipse IDE

I already have Eclipse IDE for JAVA Developers, and have different projects created for Cucumber/JAVA. I want to create a project for Javascript now, but I am not getting the option in New Project, I tried installing Plugins too but it did not worked for me.
Can someone please help. I am new to Javascript.
Is it possible to do so without having to install another eclipse? I have my projects in the previous one which i don't want to loose. I tried installing previous version of eclipse for Eclipse Javascript but I am not able to do so and the only one i see is Eclipse IDE again.
Install https://marketplace.eclipse.org/content/eclipse-web-developer-tools-0 , and then work with your JavaScript files using the Generic Text Editor. No project wizard or type is required.
First go to help>marketplace and search for javascript plugin and install it.
After installation you can find an option here,

Is there a way to use NPM packages in Android project with Kotlin

I was wondering if there is a way to use NPM packages in Android project with Kotlin. I know there is a Gradle plugin kotlin.js and it seems to work with a standalone project like a demo provided by JetBrains, but when I try to use it with Android I get this error:
Cannot add extension with name 'kotlin', as there is an extension already registered with that name.
There is even a little tutorial on how to setup kotlin/js, also provided by JetBrains, but there is nothing new.
I'm asking because I want to start a little multiplatform project, but the core part of it is a library, which I had written some time ago, but it is in Java, and it is heavily dependant on BouncyCastle and some other libraries that handles XML serialization, so there is no luck with that. But I found a similar library in JavaScript. And since I can not use any Java dependency with kotlin/multiplatform there are two options for me, either find a way to make Kotlin/JS work with Android project or move on to React-Native, which I like, but I would prefer Kotlin.

WebStorm 2016.3 + Electron: Unresolved function or method

I am playing around with Electron and WebStorm as part of a project preparation and I am struggling with different problems. Therefore I want to start simple by creating very basic stuff and working my way up.
So I have a very simple project setup in WebStorm and my first Electron app is running. But WebStorm keeps saying that it cannot resolve function names.
Electron and electron-prebuilt are added to the package.json and Node.js coding assistance is enabled. Therefore require('electron') is recognised correctly.
I saw the blog entry by JetBrains on how to start with Electron in WebStorm and found also another similar answer here on StackOverflow.
JetBrains' blog entry
StackOverflow answer
It is said, that one should add github-electron to the JavaScript library from the communitie-stubs repositories. But these seems outdated, as there is no github-electron anymore and all other electron entries are ambiguous.
So my question is: How to setup WebStorm for plain JS ES6 correctly, beginning by eliminating the "unresolved" messages?
So, after digging into the topic more and more and climbing the steep learning curve, I finally found the answer by myself.
Here we go:
Go to WebStorm's Preferences / Languages & Frameworks / TypeScript
Make sure Use TypeScript Service is enabled
Open up WebStorm's Terminal panel (as it will automatically point to your project's working directory) and install the type definitions for TypeScript via NPM:
npm install #types/electron
You don't need to use the --save / --save-dev tags, as the types are needed solely for WebStorm's code assistance and have no impact on your project.
You'll get a new entry inside your node_modules folder containing the type definitions.
And that's it. WebStorm does not show any unresolved function or method messages for this particular module anymore.
This works for theoretically every other module, as long as there are type definitions available. But chances are good, as there are a lot of them. Way more than what WebStorm's JavaScript library download functionality offers.
Have a nice day, everyone!
Martin
install the electron library. Since the github-electron has renamed to electron.

mavenized java webapp and javascript dependency management

I have a java webapp project under eclipse that is using maven for dependency management.
This webapp also depends on many javascript libraries for the front-end, either provided by external "vendors" such as jquery or bootstrap, or developped "internally" by myself.
What I want to do is manage the javascript dependencies just as I would with java dependecies, inside my POM.xml.
Now, for external dependencies I would like them to be automatically downloaded from a repository ( either hosted by me or external) - this is what Webjars could provide I believe.
For my "internal" javascript libraries I would like to create them as separate eclipse projects, in my eclipse workspace, that would be referenced inside my webapp's POM the same way I would do with a secondary java project residing in my eclipse workspace.
I also want the referenced js dependencies to be properly placed under my /src/main/webapp/js/ folder when the webapp is deployed.
Finally, when modifying something in one of my "internal" javascript libraries, I would like the changes to be automatically deployed to the webapp, as if it was a regular java sub-project referenced in the main webapp project. I specially want the changes to be redeployed to the webapp if it is running / being debugged, under eclipse.
I have heard of Javascript maven tools : http://javascript-maven.softec.lu/
or http://mojo.codehaus.org/javascript-maven-tools/javascript-maven-plugin/
but thes plugins dont seem to be maintained anymore, are lightly documented, and I failed achieving the above requirements with them (probably because of the lack of concrete examples).
Now I know I'm asking for alot but I dont mind trying different approaches, and fooling around with different tools.
Any help, thoughts, insights etc ... appreciated
Thanks

Javascript and CSS Asset Packaging in Visual Studio

I have several backbone.js views, javascript modules and style sheets in an ASP.Net MVC app i'm developing. I want to seperate these files during development but combine/consolidate, compress, uglify, resolve dependencies etc. before deployment. The Ruby community has solutions for this including Juicer and Jammit. Are there similar solutions for .Net web developers ideally solutions that integrate with visual studio.
I've used Chirpy for this in the past. Also compiles SASS, LESS, and CoffeeScript.
We use YUI Builder for exactly this purpose. (We also happen to use YUI extensively in our products.) It's Java/Ant based, but it wasn't hard to get msbuild to do all the work by creating a project file (csproj in our case) and overriding the "build" target. We include the project in our main .sln file, and it automatically builds along with all of our C#/.NET projects.
One thing to watch out for: We initially got frequent/random "access denied" errors when building this way. It turns out that Visual Studio was locking many of the intermediate files that YUI Builder generates. So our workaround is to robocopy all the relevant files to a temp folder, do the work there, and robocopy them back.
It's not ideal, and certainly not an out-of-the-box integration like you're probably hoping for, but it works well for us. It gives us minification, JSLint checking, dependency management, and an infrastructure for serving one combined file rather than individual scripts.

Categories