{"id":13452153,"url":"https://github.com/jsx/JSX","last_synced_at":"2025-03-23T19:33:47.945Z","repository":{"id":3448269,"uuid":"4501479","full_name":"jsx/JSX","owner":"jsx","description":"JSX - a faster, safer, easier JavaScript","archived":false,"fork":false,"pushed_at":"2021-09-01T01:16:37.000Z","size":22951,"stargazers_count":1462,"open_issues_count":98,"forks_count":102,"subscribers_count":64,"default_branch":"master","last_synced_at":"2024-10-29T15:35:00.888Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://jsx.github.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsx.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-30T22:41:49.000Z","updated_at":"2024-10-25T09:59:46.000Z","dependencies_parsed_at":"2022-08-03T11:45:43.679Z","dependency_job_id":null,"html_url":"https://github.com/jsx/JSX","commit_stats":null,"previous_names":[],"tags_count":91,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsx%2FJSX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsx%2FJSX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsx%2FJSX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsx%2FJSX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsx","download_url":"https://codeload.github.com/jsx/JSX/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245153877,"owners_count":20569406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T07:01:15.039Z","updated_at":"2025-03-23T19:33:47.910Z","avatar_url":"https://github.com/jsx.png","language":"JavaScript","readme":"NAME [![Build Status](https://secure.travis-ci.org/jsx/JSX.png)](http://travis-ci.org/jsx/JSX)\n=======================\n\nJSX - a faster, safer, easier JavaScript\n\nINSTALLATION\n=======================\n\nThe JSX compiler toolkit is released as a npm package, so you can install it with `npm install -g jsx`.\n\n* https://npmjs.org/package/jsx\n\nCOMPILATION\n=======================\n\nThere's `jsx(1)` command to compile JSX source code into JavaScript.\n\nType the following commands and see what happens:\n\n    # run Hello World in JSX\n    jsx --run example/hello.jsx\n\n    # compile it and output the generated code to stdout\n    jsx example/hello.jsx\n\n    # compile it with full optimizations\n    jsx --release --output hello.jsx.js example/hello.jsx\n\n    # compile it for node and execute it\n    jsx --executable node --output hello.jsx.js example/hello.jsx\n    ./hello.jsx.js # displays \"Hello, world!\"\n\n    # run a test, calling _Test#test*()\n    jsx --test example/import.jsx # import.jsx has _Test\n\n`jsx --help` shows how to to use the jsx command.\n\nINTRODUCTION\n=======================\n\nHere is a fizzbuzz problem, which can be executed by `jsx --run fizzbuzz.jsx`, showing a basic syntax of JSX.\n\n```jsx\nclass _Main {\n\tstatic function main(args :string[]) : void {\n\t\tfor (var i = 1; i \u003c= 100; ++i) {\n\t\t\tif (i % 15 == 0)\n\t\t\t\tlog \"FizzBuzz\";\n\t\t\telse if (i % 3 == 0)\n\t\t\t\tlog \"Fizz\";\n\t\t\telse if (i % 5 == 0)\n\t\t\t\tlog \"Buzz\";\n\t\t\telse\n\t\t\t\tlog i;\n\t\t}\n\t}\n}\n```\n\nSee [the documentation](http://jsx.github.io/doc.html) for details.\n\nEXAMPLES\n=======================\n\nThere are JSX source files in `example/` and `web/example/`, and the the test directory `t/`.\n\nDEVELOPMENT OF JSX COMPILER\n=======================\n\nIf you are interested in development of the JSX compiler, you should set up your environment after cloning the repo. The SDK development requires LSB 4.1 (Perl 5.8.8 and some UNIX commands) as well as NodeJS 0.8.0 or later.\n\nTo setup JSX SDK, type the following command:\n\n    git clone --recursive git://github.com/jsx/JSX.git\n    cd JSX\n    make # to build bin/jsx\n    # edit JSX compiler source files\n    make test # to make sure it works\n\nWe recommend to install `jsx(1)` as a link of `$JSX/bin/jsx` to `~/bin/jsx`.\n\n    ln -s \"$PWD/bin/jsx\" ~/bin\n\nDEVELOPMENT WEB SERVER\n-----------------------\n\nThere's a web interface, which provides a web compiler and web application examples.\nType the following commands to run the server:\n\n    make server # to run an HTTP daemon\n    open http://localhost:2012/\n\nThis server is also used to show results of JSX profiler.\nSee [Using the Profiler](http://jsx.github.io/doc/profiler.html) for details.\n\nTESTING\n-----------------------\n\nThere are unit tests in `t/` directory. Just type the following command to run the tests:\n\n    make test\n\nThese test cases are executed by `prove(1)` and dispatched by `t/util/test-runner`, and also requires `phantomjs(1)`\n\nNote that if you make a pull request you have to make sure `make test-all` for complete tests.\n\nNOTE: There are some TODO tests, which should be resolved in a future. `make show-todo` shows such TODOs.\n\nWINDOWS SUPPORT\n=======================\n\n`npm install -g jsx` should work even on Windows.\n\nRESOURCES\n=======================\n\n* [JSX web site](http://jsx.github.io/)\n* [JSX wiki](https://github.com/jsx/JSX/wiki)\n\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsx%2FJSX","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsx%2FJSX","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsx%2FJSX/lists"}