Add support for JavaScript code generation
This adds a JavaScript language target. The generated JavaScript uses Google Closure Compiler type annotations and can be compiled using the advanced compilation mode, which performs type checking and optimizations such as inlining and dead code elimination. The generated JavaScript also exports all generated symbols for use with Node.js and RequireJS. This export behavior can be turned off with the --no-js-exports flag for use with Google Closure Compiler.
Showing
- .gitignore 2 additions, 1 deletion.gitignore
- CMakeLists.txt 1 addition, 0 deletionsCMakeLists.txt
- include/flatbuffers/idl.h 18 additions, 0 deletionsinclude/flatbuffers/idl.h
- js/flatbuffers.js 1021 additions, 0 deletionsjs/flatbuffers.js
- src/flatc.cpp 6 additions, 0 deletionssrc/flatc.cpp
- src/idl_gen_js.cpp 712 additions, 0 deletionssrc/idl_gen_js.cpp
- tests/JavaScriptTest.js 116 additions, 0 deletionstests/JavaScriptTest.js
- tests/JavaScriptTest.sh 5 additions, 0 deletionstests/JavaScriptTest.sh
- tests/generate_code.sh 1 addition, 1 deletiontests/generate_code.sh
- tests/monster_test_generated.js 936 additions, 0 deletionstests/monster_test_generated.js
Loading
Please register or sign in to comment