• Nathan Mitchell's avatar
    Javascript: Add suppport for ES6 style exports (#4754) · b4ca4d3c
    Nathan Mitchell authored
    * Add suppport for ES6 style exports
    
    Adds support for ECMAScript 6 module exports during Javascript
    generation. This is useful as many development projects are
    switching to this new standard and away from custom module
    solutions. By integrating support into flatbuffers, users
    do not need to perform additional post-processing of generated
    files in order to use flatbuffers output directly in their
    codebases.
    
    Reference to ECMAScript 6 modules:
    https://www.ecma-international.org/ecma-262/6.0/#sec-exports
    
    Changes:
    * Added `--es6-js-export` option to cli parser tool
    * Added conditional code to generate a ES6 style export
      line, replacing the normal NodeJS/RequireJS line.
    
    * Fixed missing export statements
    
    Added exports for definition and struct names that were not inside namespaces
    
    * Updated Compiler.md with new generator option
    
    Added entry to Compiler.md in docs for the `--es6-js-export` flag, including a brief description of the effects and usefulness.
    b4ca4d3c
Name
Last commit
Last update
.github Loading commit data...
.travis Loading commit data...
CMake Loading commit data...
android Loading commit data...
biicode Loading commit data...
dart Loading commit data...
docs Loading commit data...
go Loading commit data...
grpc Loading commit data...
include/flatbuffers Loading commit data...
java/com/google/flatbuffers Loading commit data...
js Loading commit data...
net/FlatBuffers Loading commit data...
php Loading commit data...
python Loading commit data...
reflection Loading commit data...
samples Loading commit data...
src Loading commit data...
tests Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
BUILD Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE.txt Loading commit data...
WORKSPACE Loading commit data...
appveyor.yml Loading commit data...
biicode.conf Loading commit data...
composer.json Loading commit data...
conanfile.py Loading commit data...
package.json Loading commit data...
pom.xml Loading commit data...
readme.md Loading commit data...