module.exports = function()

in tasks/replace-sdk.js [15:36]


module.exports = function(gulp, config, commandLineArguments) {
  /*
   * `gulp replace-sdk`
   *  By default the demos reference the Mock version of the FBInsatnt SDK
   *  This task replaces it with the URL to the production SDK
   *  configured in config.sdkPath
   */

  gulp.task(
    'replace-sdk',
    gulp.series('make', function() {
      var sdkPath = config.sdkPath;
      if (commandLineArguments['_'].includes('run-mock')) {
        sdkPath = config.mockSdkPath;
      }
      return gulp
        .src(config.outputFolder + '/index.html')
        .pipe(htmlreplace({js: sdkPath}))
        .pipe(gulp.dest(config.outputFolder));
    }),
  );
};