• 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
..
clang-format.sh Loading commit data...
code_generators.cpp Loading commit data...
flatc.cpp Loading commit data...
flatc_main.cpp Loading commit data...
flathash.cpp Loading commit data...
idl_gen_cpp.cpp Loading commit data...
idl_gen_dart.cpp Loading commit data...
idl_gen_fbs.cpp Loading commit data...
idl_gen_general.cpp Loading commit data...
idl_gen_go.cpp Loading commit data...
idl_gen_grpc.cpp Loading commit data...
idl_gen_js.cpp Loading commit data...
idl_gen_json_schema.cpp Loading commit data...
idl_gen_php.cpp Loading commit data...
idl_gen_python.cpp Loading commit data...
idl_gen_text.cpp Loading commit data...
idl_parser.cpp Loading commit data...
reflection.cpp Loading commit data...
util.cpp Loading commit data...