private function to add all core JSONScript macros to the interpreter
@this JSONScript
15268
function addCoreMacros() {
  this._validateMacro = this.ajv.compile(require('jsonscript/schema/macro.json'));
  coreMacros.forEach(function (macro) {
    this.addMacro(macro, false);
  }, this);
}
58559
public function addFrontEndInlineScript()
    {
        $script = 'var jentilShortTags = '.\wp_json_encode(
            $this->app->utilities->shortTags->get()
        ).';';

        \wp_add_inline_script($this->id, $script, 'before');
    }
1215343
def compile(script, vars={}, library_paths=[]):
    

    return _pyjq.Script(script.encode('utf-8'), vars=vars,
                        library_paths=library_paths)
1358240
public void addNewScript(JsAst ast) {
    if (!addNewSourceAst(ast)) {
      return;
    }
    Node emptyScript = new Node(Token.SCRIPT);
    InputId inputId = ast.getInputId();
    emptyScript.setInputId(inputId);
    emptyScript.setStaticSourceFile(
        SourceFile.fromCode(inputId.getIdName(), ""));

    processNewScript(ast, emptyScript);
  }
1100142
function styledJSON (obj) {
  let json = JSON.stringify(obj, null, 2)
  if (cli.color.enabled) {
    let cardinal = require('cardinal')
    let theme = require('cardinal/themes/jq')
    cli.log(cardinal.highlight(json, {json: true, theme: theme}))
  } else {
    cli.log(json)
  }
}
1327240
function _addToJSON(error) {
  Object.defineProperty(error, 'toJSON', {
    value: function() {
      return serializeError(this);
    },
    configurable: true,
    writable: true
  });
}
1328244
function CompileModules(inputTree, options) {
  this.setInputTree(inputTree);
  this.setInputFiles(options.inputFiles);
  this.setResolvers(options.resolvers || []);
  this.setOutput(options.output);
  this.setFormatter(options.formatter);
  
  if (options.output) {
    this.description = 'CompileModules (' + options.output + ')';
  }
}
946902
protected function overrideLangJS(): void
    {
        // Bind the Laravel JS Localization command into the app IOC.
        $this->app->singleton('localization.js', function ($app) {
            $app = $this->app;
            $laravelMajorVersion = (int) $app::VERSION;

            $files = $app['files'];

            if ($laravelMajorVersion === 4) {
                $langs = $app['path.base'].'/app/lang';
            } elseif ($laravelMajorVersion === 5) {
                $langs = $app['path.base'].'/resources/lang';
            }
            $messages = $app['config']->get('localization-js.messages');
            $generator = new LangJsGenerator($files, $langs, $messages);

            return new LangJsCommand($generator);
        });

        // Bind the Laravel JS Localization command into Laravel Artisan.
        $this->commands('localization.js');
    }
401508
function() {    
    var self = this, vars, j;
    
    // If this editor needs to be rendered by a macro template
    if(this.template) {
      vars = this.getWatchedFieldValues();
      this.setValue(this.template(vars),false,true);
    }
    
    this._super();
  }
537369
function(class_json, opts) {
	var options = util.extend({
		javascript: false, // true, false
		scope: '', // directory to look for initial file
		variables: {
			// contains a key->value object with variables to @extends
		}
	}, opts);

	// Stores JSON objects of files that have to be merged together:
	// ["a", "b"]
	var file_list = util.isArray(class_json[indicators.EXTENDS]) ?
		class_json[indicators.EXTENDS] :
		class_json[indicators.EXTENDS] != null ?
			[ class_json[indicators.EXTENDS] ] :
			[];

	// Delete @extends from base_json to avoid infinitive recursion
	delete class_json[indicators.EXTENDS];

	// Push class_json to the path list:
	file_list.push(class_json);

	/*****************************************************************************
	*  Merge file by file
	*****************************************************************************/

	// default config for each file required:
	// set asText = false so we get an object returned
	// set scope = file's directory so there can be relative references
	var json_config = util.defaults({
		asText: false,
		scope: options._as ? path.dirname(file_path) : options.scope,

		// _as is a hack so that we know its we are calling the function recursive
		_as: ANTI_SANITIZER
	}, options);

	// super_json is our output, start by containing first file in array
	var super_json = fromFile(file_list.shift(), json_config);

	// TODO: Figure out when to sanitize super_json hopefully we don't have to
	//   santize all returns. I'm not sure about this, and I'm not sure if we
	//   can even sanitize super_json when we return it.
	//   Is super_json used by anyone recursively?

	while (file_list.length) {
		var json = fromFile(file_list.shift(), json_config);

		merge(super_json, json);
	}

	// If this file is called from the outside eg json_merger.from...
	//   File('file_which_doesnt_extends_another_file.json')
	//   we need to sanitize the file and remove all indicators
	if (options._as != ANTI_SANITIZER) {
		super_json = util.sanitizeValue(super_json);
	}

	/*****************************************************************************
	*  Return super_json
	*****************************************************************************/

	return super_json;
}
1111214
function addJestToPackageJson(destinationRoot) {
  var packageJSONPath = path.join(destinationRoot, 'package.json');
  var packageJSON = JSON.parse(fs.readFileSync(packageJSONPath));

  packageJSON.scripts.test = 'jest';
  packageJSON.jest = {
    preset: 'react-native'
  };
  fs.writeFileSync(packageJSONPath, JSON.stringify(packageJSON, null, '\t'));
}
544807
function() {

    var hookPath = path.resolve(this.options.dest, this.hookName);

    var existingCode = this.getHookContent(hookPath);

    if (existingCode) {
      this.validateScriptLanguage(existingCode);
    }

    var hookContent;
    if(this.hasMarkers(existingCode)) {
      hookContent = this.insertBindingCode(existingCode);
    } else {
      hookContent = this.appendBindingCode(existingCode);
    }

    fs.writeFileSync(hookPath, hookContent);

    fs.chmodSync(hookPath, '755');
  }
1140421
function ScriptHelper(opt) {

	// default configuration
	this.config = {
		'root': 		(module.parent) ? path.dirname(module.parent.filename) : __dirname,
		'macro':		'#include',
		'extension':	'lua',
		'encoding':		null
	};

	// if options are provided, set those options
	if (typeof opt === 'string') opt = {'root': opt};
	if (typeof opt === 'object') {
		for (var key in opt) {
			if (opt.hasOwnProperty(key) && typeof this.config[key] !== 'undefined') 
				this.config[key] = opt[key];
		}
	}

	// prepend a . before extension config value
	if (this.config.extension) {
		if (this.config.extension.substr(0, 1) !== '.') 
			this.config.extension = '.' + this.config.extension;
	} else { this.config.extension = ''; }

	// set internal vars
	this.clearCache();

}
320287
private void buildBasicScript(PrintWriter script) {
        //script.println("require 'rubygems'");
        script.println("require 'compass'");
        script.println("frameworks = Dir.new(Compass::Frameworks::DEFAULT_FRAMEWORKS_PATH).path");
        script.println("Compass::Frameworks.register_directory(File.join(frameworks, 'compass'))");
        script.println("Compass::Frameworks.register_directory(File.join(frameworks, 'blueprint'))");
        script.println("Compass.add_project_configuration '" + config + "'");
        script.println("Compass.configure_sass_plugin!");
    }
1130245
protected function registerScript()
    {
        $clientOptions = (count($this->clientOptions)) ? Json::encode($this->clientOptions) : '';
        $this->getView()->registerJs("jQuery('#{$this->options['id']}').redactor({$clientOptions});");
    }
580284
function ()
		{
			for (c in this.c)
			{
				if (this.c[c].build && this.c[c].build.extend && this.c[c].build.extend.indexOf('wnScript')!=-1)
				{
					this.prepareScript(c);
				}
			}
		}
73356
void insertMacros(TokenList tokens ) {
        TokenList.Token t = tokens.getFirst();
        while( t != null ) {
            if( t.getType() == Type.WORD ) {
                Macro v = lookupMacro(t.word);
                if (v != null) {
                    TokenList.Token before = t.previous;
                    List<TokenList.Token> inputs = new ArrayList<TokenList.Token>();
                    t = parseMacroInput(inputs,t.next);

                    TokenList sniplet = v.execute(inputs);
                    tokens.extractSubList(before.next,t);
                    tokens.insertAfter(before,sniplet);
                    t = sniplet.last;
                }
            }
            t = t.next;
        }
    }