Add imports for current loaded javascript file. Add imported javascript file for current class into scriptArr.
187652
function addAddedFileInnScript(key, path, dot_path){
			dot_path = dot_path || path;
			// checking if same file imported twice for same Class.
			if(!dot_path) return;
			var script = scriptArr[scriptArr.length - 1];
			if( !script ){
				return;
			}
			var arr = script[key] ||  (script[key] = []);
			if( arr.indexOf(dot_path) === -1 ) {
				arr.push(dot_path);
			}
			return true;
		}
1330012
function JavaScriptLoader(loadItem, preferXHR) {
		this.AbstractLoader_constructor(loadItem, preferXHR, createjs.AbstractLoader.JAVASCRIPT);

		// public properties
		this.resultFormatter = this._formatResult;

		// protected properties
		this._tagSrcAttribute = "src";
		this.setTag(document.createElement("script"));
	}
1009750
function loadJSConfigFile(filePath) {
    debug(`Loading JS config file: ${filePath}`);
    try {
        return importFresh(filePath);
    } catch (e) {
        debug(`Error reading JavaScript file: ${filePath}`);
        e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
        throw e;
    }
}
589902
def _import(klass):
        ''''''
        mod = __import__(klass.rpartition('.')[0])
        for segment in klass.split('.')[1:-1]:
            mod = getattr(mod, segment)

        # Alright, now check the file associated with it. Note that clases
        # defined in __main__ don't have a __file__ attribute
        if klass not in BaseJob._loaded:
            BaseJob._loaded[klass] = time.time()
        if hasattr(mod, '__file__'):
            try:
                mtime = os.stat(mod.__file__).st_mtime
                if BaseJob._loaded[klass] < mtime:
                    mod = reload_module(mod)
            except OSError:
                logger.warn('Could not check modification time of %s',
                    mod.__file__)

        return getattr(mod, klass.rpartition('.')[2])
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);
  }
781386
def javascript_include_tag(js_file)
      js_file = js_file + '.js' unless js_file.end_with?('.js')
      path = normalize_path(File.join('/js', js_file))
      content_tag 'script', 'type' => 'text/javascript', 'src' => path
    end
535348
private static void loadScript(ScriptEngine engine, Supplier<Reader> scriptReader) {

        try (Reader reader = scriptReader.get()) {
            engine.eval(reader);
        } catch (ScriptException | IOException e) {
            throw new RuntimeException(e);
        }

    }
469464
def add_to_loaded_modules(self, modules):
        
        modules = util.return_set(modules)
        for module in modules:
            if not isinstance(module, str):
                module = module.__name__
            self.loaded_modules.add(module)
572113
def _add_mermaid_js(self):
        """"""
        self.add_javascripts('{}/js/jquery-1.11.3.min.js'.format(self.resources_path))
        self.add_javascripts('{}/js/mermaid.min.js'.format(self.resources_path))
        self.add_stylesheets('{}/css/mermaid.css'.format(self.resources_path))
        self.main_soup.script.append('mermaid.initialize({startOnLoad:true  });')
888628
function add(el, fn){
  el.addEventListener('load', function(_, e){ fn(null, e); }, false);
  el.addEventListener('error', function(e){
    var err = new Error('script error "' + el.src + '"');
    err.event = e;
    fn(err);
  }, false);
}
603776
static void addFeatureToScript(Node scriptNode, Feature feature) {
    checkState(scriptNode.isScript(), scriptNode);
    FeatureSet currentFeatures = getFeatureSetOfScript(scriptNode);
    FeatureSet newFeatures =
        currentFeatures != null
            ? currentFeatures.with(feature)
            : FeatureSet.BARE_MINIMUM.with(feature);
    scriptNode.putProp(Node.FEATURE_SET, newFeatures);
  }
730723
function (parent,config,modulePath,npmPath,classesSource)
	{
		this.e.log&&this.e.log('Constructing new `'+this.className+'`...','system');

		if (modulePath==undefined)
			modulePath = cwd;

		try {
			this.setParent(parent);
		} catch (e)
		{
			if (e)
				console.log(this);
		}

		this.setModulePath(path.resolve(path.resolve(parent.modulePath,modulePath))+'/');

		this.preinit.apply(this,arguments); 

		this.npmPath = npmPath || [];
		this.importClasses(classesSource);

		var defaultConfig = cwd+sourcePath+'config/'+className.split('_')[0]+'Config.json';
		if (fs.existsSync(defaultConfig))
			this.configureFromFile(defaultConfig);
		if (fs.existsSync(this.modulePath + this.configFile))
			this.configureFromFile(this.modulePath + this.configFile);
		if (config)
			this.setConfig(config);

		_debug = this.getConfig('debug')===true;

		this.importPackages();
		this.importFromConfig();

		Object.defineProperty(this,'c',{ value: this.getComponent('classBuilder').classes, enumerable:false, writable: false });
		this.c.module = self;

		this.preloadEvents();
		this.preloadComponents();

		this.setEvents({ 'ready': {} });
		var ready=this.getEvent('ready');
		ready.once(function (e) {
			self.startComponents();
			self.prepareModels();
			self.prepareScripts();

			self.init.apply(self,arguments);
			self.run.apply(self,arguments);
			_initialized=true;
		});
	}
810464
public void addClassesToCheck(File basedir, Iterable<String> relativeNames) throws IOException {
    logger.info("Loading classes to check...");
    for (final String f : relativeNames) {
      addClassToCheck(new File(basedir, f));
    }
  }
1036082
def _add_finder(importer, finder):
  """"""

  existing_finder = _get_finder(importer)

  if not existing_finder:
    pkg_resources.register_finder(importer, finder)
  else:
    pkg_resources.register_finder(importer, ChainedFinder.of(existing_finder, finder))
1025503
def append_js!(html, after_script_name, script_name)
      html.sub!(script_matcher(after_script_name)) do
        "#{$~}\n" + helper.javascript_include_tag(script_name)
      end
    end
533584
public function addScripts() {
		if ( $this->isConnectScreen( get_current_screen() ) ) {
			// Enqueue bglib-connect js.
			$handle = 'bglib-connect';

			wp_register_script(
				$handle,
				Configs::get( 'libraryUrl' ) . 'src/assets/js/connect.js' ,
				array( 'jquery' ),
				date( 'Ymd' ),
				false
			);

			$translation = array(
				'settingsSaved' => __( 'Settings saved.', 'boldgrid-library' ),
				'unknownError'  => __( 'Unknown error.', 'boldgrid-library' ),
				'ajaxError'     => __( 'Could not reach the AJAX URL address. HTTP error: ', 'boldgrid-library' ),
			);

			wp_localize_script( $handle, 'BoldGridLibraryConnect', $translation );

			wp_enqueue_script( $handle );

			// Enqueue jquery-toggles js.
			wp_enqueue_script(
				'jquery-toggles',
				Configs::get( 'libraryUrl' ) . 'build/toggles.min.js',
				array( 'jquery' ),
				date( 'Ymd' ),
				true
			);

			// Enqueue jquery-toggles css.
			wp_enqueue_style( 'jquery-toggles-full',
				Configs::get( 'libraryUrl' ) . 'build/toggles-full.css', array(), date( 'Ymd' ) );

			/**
			 * Add additional scripts to Connect page.
			 *
			 * @since 2.4.0
			 */
			do_action( 'Boldgrid\Library\Library\Page\Connect\addScripts' );
		}
	}
330828
def add_library(self, library):
        
        for fn in library.__dict__.copy().values():
            # ignore imported methods and anything beginning __
            if inspect.isfunction(fn) and inspect.getmodule(fn) == library and not fn.__name__.startswith('__'):
                name = fn.__name__.lower()

                # strip preceding _ chars used to avoid conflicts with Java keywords
                if name.startswith('_'):
                    name = name[1:]

                self._functions[name] = fn