1. 19 Dec, 2015 1 commit
  2. 15 Nov, 2015 1 commit
    • Martin Hoeher's avatar
      Add implementation of qjsgen command line tool · 6695e562
      Martin Hoeher authored
      This change adds the implementation of the qjsgen command line tool,
      which is a basic interface to the QJSTemplateEngine and enables usage of
      the engine e.g. in a build system or by other applications without
      having to link against the engine's library. The tool takes template
      files either on command line or via stdin. In addition to templates,
      data files can be passed to the tool as well. Finally, output is written
      to the specified output file or - if omitted - gets printed to stdout.
      Finally, the tool also can be used to transpile template files to
      JavaScript, which allows to cache the template parsing and run
      additional steps (e.g. a JavaScript compressor) on the intermediate
      This closes issue #9.
  3. 14 Nov, 2015 4 commits
    • Martin Hoeher's avatar
      Add INIFileLoader · f7651d8e
      Martin Hoeher authored
      This commit adds the INIFileLoader class, which enables the template
      engine to access information stored in INI style formatted files.
      Closes #5.
    • Martin Hoeher's avatar
      Add JSONFileLoader · b37b96e0
      Martin Hoeher authored
      This commit adds a new JSONFileLoader, which is used in order to access
      data encoded in JSON files.
      Closes #3.
    • Martin Hoeher's avatar
      Introducing Blocks API · 8021df63
      Martin Hoeher authored
      This commit adds the two new APIs "addBlock()" as well as "block()" to
      the QJSTemplateEngine JavaScript API. This allows a template to install
      a block, i.e. an object which must have a render() method. Blocks are
      rendered after the actual template finished. Furthermore, blocks can
      also be specialized, i.e. a template can derive from another one and
      use block() to first get a block defined by the base template and then
      addBlock() with the same block name and block definition again in order
      to refine the base block definition.
      Closes #6.
    • Martin Hoeher's avatar
      Add FileLoader APIs · 0c741755
      Martin Hoeher authored
      This commit adds the FileLoader APIs which allow the engine to load
      various different file formats. For each file format that shall be
      supported, an instance of FileFormat can be installed in a
      Configuration. This is important for the qjsgen tool, as it has to be
      able to provide access to file contents to the templates.
      This change also adds initial support for plain text files via
      Closes #2 and #7.
  4. 20 Sep, 2015 2 commits
    • Martin Hoeher's avatar
      Extended README · 3f0c30d8
      Martin Hoeher authored
      Put some more information into the README.
    • Martin Hoeher's avatar
      Added DataProvider and QVariantDataProvider · 145572e9
      Martin Hoeher authored
      Added a new class DataProvider which is responsible to wrap custom data
      and make it available to the template engine at execution time. Added a
      new API in the Engine class (addDataProvider()) which allows the user to
      add arbitrary many data providers to the engine. Enhanced
      QJSTemplateEngineAPI class to make the data available via the
      QJSTemplateEngine.data property. Added QVariantDataProvider class, which
      makes data stored in QVariant values available to the Engine.
  5. 19 Sep, 2015 1 commit
    • Martin Hoeher's avatar
      Implemented Engine class · b67b0d10
      Martin Hoeher authored
      This change adds the implementation of the Engine class. For this, an
      additional QJSTemplateEngineAPI class has been added, which provides the
      JavaScript API which is used by the generated JavaScript. Added a Engine
      unit test to test the Engine's API and several features of the template
      engine (simple text, executable JS, printable JS, includes).
  6. 17 Sep, 2015 2 commits
  7. 16 Sep, 2015 1 commit
    • Martin Hoeher's avatar
      Finished Configuration class and started AST · 3cfe6960
      Martin Hoeher authored
      The Configuration class is done for the moment (should provide all
      necessary data structures and members for the first parser
      implementation. Furthermore, this change adds various AST::* classes
      which are used to represent nodes in the parsed template.
  8. 15 Sep, 2015 1 commit