<commit_before># This file inherits default targets for Node addons, see https://github.com/nodejs/node-gyp/blob/master/addon.gypi
{
  'includes': [ 'common.gypi' ], # brings in a default set of options that are inherited from gyp
  'variables': { # custom variables we use specific to this file
      'error_on_warnings%':'true', # can be overriden by a command line variable because of the % sign using "WERROR" (defined in Makefile)
      # Use this variable to silence warnings from mason dependencies and from NAN
      # It's a variable to make easy to pass to
      # cflags (linux) and xcode (mac)
      'system_includes': [
        "-isystem <(module_root_dir)/<!(node -e \"require('nan')\")",
        "-isystem <(module_root_dir)/mason_packages/.link/include/",
        "-isystem <(module_root_dir)/mason_packages/.link/include/freetype2",
        '-isystem <(SHARED_INTERMEDIATE_DIR)'
      ],
      # Flags we pass to the compiler to ensure the compiler
      # warns us about potentially buggy or dangerous code
      'compiler_checks': [
        '-Wall',
        '-Wextra',
        '-Weffc++',
        '-Wconversion',
        '-pedantic-errors',
        '-Wconversion',
        '-Wshadow',
        '-Wfloat-equal',
        '-Wuninitialized',
        '-Wunreachable-code',
        '-Wold-style-cast',
        '-Wno-error=unused-variable'
      ]
  },
  # `targets` is a list of targets for gyp to run.
  # Different types of targets:
  # - [executable](https://github.com/mapbox/cpp/blob/master/glossary.md#executable)
  # - [loadable_module](https://github.com/mapbox/cpp/blob/master/glossary.md#loadable-module)
  # - [static library](https://github.com/mapbox/cpp/blob/master/glossary.md#static-library)
  # - [shared library](https://github.com/mapbox/cpp/blob/master/glossary.md#shared-library)
  # - none: a trick to tell gyp not to run the compiler for a given target.
  'targets': [
    {
      # This target: 
      # - doesnt build any code (why it's type "none", to tell gyp not to run the compiler)
      # - runs a script to install mason packages
      'target_name': 'action_before_build',
      'type': 'none',
      'hard_dependency': 1,
      'actions': [
        {
          'action_name': 'install_deps',
          'inputs': ['./scripts/install_deps.sh'],
          'outputs': ['./mason_packages'],
          'action': ['./scripts/install_deps.sh']
        }
      ]
    },
    {
      'target_name': 'action_before_build2',
      'type': 'none',
      'dependencies': [
        'action_before_build'
      ],
      'hard_dependency': 1,
      'actions': [
        {
          'action_name': 'run_protoc_glyphs',
          'inputs': [
            './proto/glyphs.proto'
          ],
          'outputs': [
            "<(SHARED_INTERMEDIATE_DIR)/glyphs.pb.cc"
          ],
          'action': ['./mason_packages/.link/bin/protoc','-Iproto/','--cpp_out=<(SHARED_INTERMEDIATE_DIR)/','./proto/glyphs.proto']
        }
      ]
    },
    {
      # module_name and module_path are both variables passed by node-pre-gyp from package.json
      'target_name': '<(module_name)', # sets the name of the binary file
      'product_dir': '<(module_path)', # controls where the node binary file gets copied to (./lib/binding/module.node)
      'type': 'loadable_module',
      'dependencies': [ 'action_before_build2' ],
      # "make" only watches files specified here, and will sometimes cache these files after the first compile.
      # This cache can sometimes cause confusing errors when removing/renaming/adding new files. 
      # Running "make clean" helps to prevent this "mysterious error by cache" scenario
      # This also is where the benefits of using a "glob" come into play...
      # See: https://github.com/mapbox/node-cpp-skel/pull/44#discussion_r122050205
      'sources': [
        'src/node_fontnik.cpp',
        'src/glyphs.cpp',
        '<(SHARED_INTERMEDIATE_DIR)/glyphs.pb.cc'
      ],
      "link_settings": {
        "libraries": [
         "-lfreetype",
         "-lprotobuf-lite"
         ],<commit_msg>default to warnings as warnings for now to dodge MakeCallback deprecation (for now)<commit_after># This file inherits default targets for Node addons, see https://github.com/nodejs/node-gyp/blob/master/addon.gypi
{
  'includes': [ 'common.gypi' ], # brings in a default set of options that are inherited from gyp
  'variables': { # custom variables we use specific to this file
      'error_on_warnings%':'false', # can be overriden by a command line variable because of the % sign using "WERROR" (defined in Makefile)
      # Use this variable to silence warnings from mason dependencies and from NAN
      # It's a variable to make easy to pass to
      # cflags (linux) and xcode (mac)
      'system_includes': [
        "-isystem <(module_root_dir)/<!(node -e \"require('nan')\")",
        "-isystem <(module_root_dir)/mason_packages/.link/include/",
        "-isystem <(module_root_dir)/mason_packages/.link/include/freetype2",
        '-isystem <(SHARED_INTERMEDIATE_DIR)'
      ],
      # Flags we pass to the compiler to ensure the compiler
      # warns us about potentially buggy or dangerous code
      'compiler_checks': [
        '-Wall',
        '-Wextra',
        '-Weffc++',
        '-Wconversion',
        '-pedantic-errors',
        '-Wconversion',
        '-Wshadow',
        '-Wfloat-equal',
        '-Wuninitialized',
        '-Wunreachable-code',
        '-Wold-style-cast',
        '-Wno-error=unused-variable'
      ]
  },
  # `targets` is a list of targets for gyp to run.
  # Different types of targets:
  # - [executable](https://github.com/mapbox/cpp/blob/master/glossary.md#executable)
  # - [loadable_module](https://github.com/mapbox/cpp/blob/master/glossary.md#loadable-module)
  # - [static library](https://github.com/mapbox/cpp/blob/master/glossary.md#static-library)
  # - [shared library](https://github.com/mapbox/cpp/blob/master/glossary.md#shared-library)
  # - none: a trick to tell gyp not to run the compiler for a given target.
  'targets': [
    {
      # This target:
      # - doesnt build any code (why it's type "none", to tell gyp not to run the compiler)
      # - runs a script to install mason packages
      'target_name': 'action_before_build',
      'type': 'none',
      'hard_dependency': 1,
      'actions': [
        {
          'action_name': 'install_deps',
          'inputs': ['./scripts/install_deps.sh'],
          'outputs': ['./mason_packages'],
          'action': ['./scripts/install_deps.sh']
        }
      ]
    },
    {
      'target_name': 'action_before_build2',
      'type': 'none',
      'dependencies': [
        'action_before_build'
      ],
      'hard_dependency': 1,
      'actions': [
        {
          'action_name': 'run_protoc_glyphs',
          'inputs': [
            './proto/glyphs.proto'
          ],
          'outputs': [
            "<(SHARED_INTERMEDIATE_DIR)/glyphs.pb.cc"
          ],
          'action': ['./mason_packages/.link/bin/protoc','-Iproto/','--cpp_out=<(SHARED_INTERMEDIATE_DIR)/','./proto/glyphs.proto']
        }
      ]
    },
    {
      # module_name and module_path are both variables passed by node-pre-gyp from package.json
      'target_name': '<(module_name)', # sets the name of the binary file
      'product_dir': '<(module_path)', # controls where the node binary file gets copied to (./lib/binding/module.node)
      'type': 'loadable_module',
      'dependencies': [ 'action_before_build2' ],
      # "make" only watches files specified here, and will sometimes cache these files after the first compile.
      # This cache can sometimes cause confusing errors when removing/renaming/adding new files.
      # Running "make clean" helps to prevent this "mysterious error by cache" scenario
      # This also is where the benefits of using a "glob" come into play...
      # See: https://github.com/mapbox/node-cpp-skel/pull/44#discussion_r122050205
      'sources': [
        'src/node_fontnik.cpp',
        'src/glyphs.cpp',
        '<(SHARED_INTERMEDIATE_DIR)/glyphs.pb.cc'
      ],
      "link_settings": {
        "libraries": [
         "-lfreetype",
         "-lprotobuf-lite"
         ],
{'fraction_non_alphanumeric': 0.13714704803813715, 'fraction_numerical': 0.003911502261337245, 'mean_word_length': 2.49508756941478, 'pattern_counts': {'":': 4, '<': 23, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5764379', 'n_tokens_mistral': 2571, 'n_tokens_neox': 2534, 'n_words': 634}