I am learning GameClosure (a HTML5 game engine) and want to develop in JavaScript in Eclipse. I've downloaded WTP 3.4.2 plugin, but Eclipse don't recognize the syntax of import ... as ... like here:
Is there any way to fix that and have GameClosure support? There is needed a special compiler or something? (GameClosure uses basil)
I also have an warning with no semicolon after last entry in parameter-array:
I assume this semicolon isn't needed, but how can I make this warning go away?
Looks like it's using the old Harmony modules proposal, in which case Eclipse will not parse it properly, it chokes on "let" never mind modules.
Hopefully once the standard is released later on this year Eclipse will receive an upgraded parser.
you can use jsio as an importer:
jsio("import device");
//etc.
Related
I have a web project containing mainly php and javascript files along with some html and css files. Now I would like to use eclipse as my IDE for all of these. But looking at eclipse.org - I'm confused...
There are so many different tools and versions, I really don't know what to do or how to set this up. I found the eclipse PDT for php and there's something called wild web developer which seems to be for js, html and more, but not php.
Is there a package I can download and install that does what I want? Or do I have to configure that myself somehow? If the latter - can anyone point me to tutorial for dummies? It's been 14 years since I used eclipse and it seems I've forgotten everything.
Head over to eclipse packages. You can find the distribution for your language.
It is worth noticing, that when you upgrade from an older Eclipse for PHP develpers edition and are missing Javascript-Editors entirely, that you can manually install the "Wild Web Editor". It is included in the current Eclipse-PHP_Package but didn't install itself when upgrading (at least in my case).
I've developed a node 13.12 application that uses only ES6 style module imports. Given that it's 2020, I'd like to use a testing framework that can natively support those imports without requiring Babel or any other transpiling. Does such a framework exist yet?
At this point (May 2020) I have been unable to locate a testing framework that fits the bill. I ended up rolling my own rudimentary one, wasn't as hard as I thought. Just reimplementing some of the common paradigms like "expect equals" and "expect error". Enough to get some testing done and move on with the real work.
I found the ASPNETCoreTemplatePack by MadsKristensen a very good starting point for developing ASP.NET Core applications using Angular 2 as frontend. But as I started editing, I got 448 errors in the error-list dialog. Some of them are from the example Angular components, others actually generated by node.js modules. All came from TypeScript files. The project column says virtual TypeScript project and I opened some at random.
Example
Nr. 1: ClientApp/app/components/app/counter/counter.component.ts
#Component({
selector: 'counter',
template: require('./counter.component.html')
})
Here VS says The name "require" was not found.
Nr 2: node_modules/rxjs/add/operator/map.d.ts
import { MapSignature } from '../../operator/map';
declare module '../../Observable' {
interface Observable<T> {
map: MapSignature<T>;
}
}
Error: Invalid module name in augmentation, module '../../Observable' cannot be found.
And so on, as I said there are nearly 500 of them. Seems that Visual Studio misunderstand something here, as the app is compiling and all function work like expected. Also the counter-component, which couldn't work when the error was true, cause the require-function load its view. So I want to disable those errors - they make me missing real errors in my code, which had to be fixed.
Things I already tried:
Setting TypeScriptCompileBlocked to true in the project file like described here: http://rostacik.net/2015/08/14/how-to-disable-building-of-typescript-files-in-visual-studio-2015/
Added a tsconfig.json in the project-root with "exclude": [ "bin", "node_modules" ]
By doing some research I found out that the used functions like module or require and also some syntax-constructs are introcuted in the TypeScript 2.0 Version. First this was confusing me, since my package.jsonfile already refers to TypeScript in the 2.0.0 Version. Also an upgrade to 2.1.5 (latest version in time of writing) doesn't change anything.
After trying some other things I searched for the needle in the haystack as we said in Germany. And I learned that Visual Studio has a TypeScript for Visual Studio 2015 package. This seems to contain some sort of rules to validate TypeScript in the errorlist-window. Its version is the same as TypeScript: TypeScript 2.1.5 > TypeScript for Visual Studio (2015) 2.1.5.
So its very important to have the same version of TypeScript for Visual Studio installed as the TypeScript version you're using as compiler. In my case, I had TypeScript for Visual Studio in Version 1.8.36 since I'm new to it and never used it before. Seems like the default one installed by VS. But the ASPNETCoreTemplatePack refers to 2.0.0 which caused this problem.
Install a specific version
My solution above will cause a new problem. The download page from Microsoft lists multiple older versions like 2.1.4 or 2.0.6 with links for downloading. But all refers to TypeScript_Dev14Full.exe, which is the latest (so currently 2.1.5). You could get a wider range of versions in the Visual Studio Marketplace.
Please note: Some versions of the market contains warnings that installing the addon would break their VS or TypeScript. I don't had tried this, since the latest version 2.1.5 is fine for me. But its may a good hint for people who had problems with the latest version. Please take care, backup your data and better create some sort of restore point, so that you can easily get a working development-area in case of anything breaks.
Is it possible to use WebStorm for developing HTML+JS projects WITHOUT writing my own (more and more) complex configuration scripts for babel/gulp/grunt/webpack or similar tools?
I don't need complex frameworks (like Angular or React), but importing multiple ECMAScript 2015 files, debugging and deployment should still be possible.
I found several Settings in WebStorm 2016.1.3, and they seem to integrate some tools, but they do not seem to (automatically) establish a working development system comparable with Visual Studio?
EDIT:
I would like to see my web pages in chrome and debug JS in WebStorm.
current browser and nodejs not full support es2015 feactures, you can use polifil like babel and for using systemjs dependancies (in browser for create bundle) you need use webpack.
You can use pure javascript without any dependancies if feactures is supported, refer to https://kangax.github.io/compat-table/es6/
You don't need gulp/grunt/etc.
WebStorm supports ES2015 just fine, and even some ES2016 features (e.g. async/await). You don't even need to configure a file watcher. Just define the "node" executable to be babel-node.
Currently, if I have e.g. import {localeModule, test} from '../qunit'; in a JS file, NetBeans (8.0.2) marks it as an error: "Expected an operand but found import".
Does the latest NetBeans version really don't have support for that statement (doesn't sound credible for such a popular IDE, supposedly one of the best in JavaScript support), or is there some switch I have to change in the settings?
Installing NodeJS plugin didn't help.
Ah ha!
The problem is what version of Javascript you have selected. JS6 supports 'import x from y;' syntax.
So for example if you are using the newest generator-angular-fullstack (which tries to show the newest, best practices) and get the import errors just:
In Webstorm: File -> Settings -> Languages & Frameworks -> Javascript -> Javascript language version, select JS6 vs JS5.x
Problem: I haven't found out how to set the JavaScript compliance version (like Eclipse has for Java) for even NetBeans 8.1 RC2 (yet).
It seems there is no support yet as of Netbeans 8.0.2
ES6 syntax support
And found this post
link to the post