laiweiwei / es4x

EcmaScript Language Support for Eclipse Vert.x

Home Page:https://reactiverse.io/es4x/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ES4X

This is the EcmaScript (5.1+) language support for Eclipse Vert.x

Build Status Join the chat at https://gitter.im/es4x/Lobby

Usage

Create a project:

# create a generic project
mkdir my-app
cd my-app
npx es4x-pm init
# add dependencies
npm install @vertx/unit --save-dev
npm install @vertx/core --save-prod
# will trigger the download
# of the java dependencies
npm install

Create your index.js:

/// <reference types="@vertx/core/runtime" />
// @ts-check

vertx
  .createHttpServer()
  .requestHandler(function (req) {
    req.response().end("Hello!");
  })
  .listen(8080);

console.log('Server listening at: http://localhost:8080/');

and your index.test.js:

import { TestSuite } from '@vertx/unit';

const suite = TestSuite.create("the_test_suite");

suite.test("my_test_case", function (context) {
  var s = "value";
  context.assertEquals("value", s);
});

suite.run();
npm start

Profit!

Documentation

For more documentation please see docs.

About

EcmaScript Language Support for Eclipse Vert.x

https://reactiverse.io/es4x/

License:Apache License 2.0


Languages

Language:Java 83.5%Language:JavaScript 14.0%Language:Shell 1.9%Language:Dockerfile 0.5%Language:Batchfile 0.1%