Compile file with Tilt engine
 @param filename [String] filename
967362
def compile_file(filename = @filename)
			cached = @controller.cached_tilts[filename]
			return cached if @cache && cached

			compiled = Tilt.new(filename, nil, @tilt_options)
			@controller.cached_tilts[filename] ||= compiled if @cache
			compiled
		end
912369
def compile_files(files)
      files.each do |base_path|
        # We do this second glob in case the path provided in the tayfile
        # references a compiled version
        Dir[@base_dir.join('src', base_path + '*')].each do |path|
          path = Pathname.new(path).relative_path_from(@base_dir.join('src'))
          file_in_path = @base_dir.join('src', path)
          file_out_path = asset_output_filename(@output_dir.join(path), @sprockets.engines.keys)

          if @sprockets.extensions.include?(path.extname)
            content = @sprockets[file_in_path].to_s
          else
            content = File.read(file_in_path)
          end

          FileUtils.mkdir_p(file_out_path.dirname)
          File.open(file_out_path, 'w') do |f|
            f.write content
          end
        end
      end
    end
466260
def write(self, filename):
        
        ext = os.path.splitext(filename)[1]
        writer = open(filename, 'w')
        if ext == '.py':
            writer.write(pprint.pformat(self))
        elif ext == '.yaml':
            writer.write(yaml.dump(self))
        else:
            writer.close()
            raise Exception('Unrecognized config format: %s'%ext)
        writer.close()
970122
public void compile(String fileName, LineMap lineMap)
    throws IOException, ClassNotFoundException
  {
    compile(fileName, lineMap, false);
  }
1112882
def compile_compiler_source(source)
      ExecJS.compile(source).tap do |compiler|
        raise engine::CompilerError, "Failed to compile #{ engine.name } compiler" unless compiler
      end
    end
403672
def link_file(filename, title = nil, anchor = nil) # rubocop:disable Lint/UnusedMethodArgument
      return filename.filename if CodeObjects::ExtraFileObject === filename
      filename
    end
1304574
def set_file(self, filename):
        
        filename = os.path.abspath(filename)
        self.set(ConfigSource(load_yaml(filename), filename))
888507
def compile
      @source.gsub('{{STORY_NAME}}', Twee2::build_config.story_name).gsub('{{STORY_DATA}}', Twee2::build_config.story_file.xmldata).gsub('{{STORY_FORMAT}}', @name)
    end
1177379
def compile_file(self, infile, outfile, outdated=False, force=False):
        """"""
        myfile = codecs.open(outfile, 'w', 'utf-8')

        if settings.DEBUG:
            myfile.write(sass.compile(filename=infile))
        else:
            myfile.write(sass.compile(filename=infile,
                                      output_style='compressed'))
        return myfile.close()
975514
def dump(filename)
      File.open(filename,'w') do |f|
        YAML.dump(self.to_hash,f)
      end
    end
911282
def compile
      compiled_assets = {}
      machined.sprockets.each do |sprocket|
        next unless sprocket.compile?
        sprocket.each_logical_path do |logical_path|
          url = File.join(sprocket.config.url, logical_path)
          next unless compiled_assets[url].nil? && compile?(url)

          if asset = sprocket.find_asset(logical_path)
            compiled_assets[url] = write_asset(sprocket, asset)
          end
        end
      end
      compiled_assets
    end
1105068
def render_erb_template(template_path, options)
      require 'tilt'
      Tilt::ERBTemplate.new(template_path).render(nil, options)
    end
180977
function (fileName) {
            var dir;
            if (currDirRegExp.test(fileName)) {
                dir = frontSlash(location.href);
                if (dir.indexOf('/') !== -1) {
                    dir = dir.split('/');

                    //Pull off protocol and host, just want
                    //to allow paths (other build parts, like
                    //require._isSupportedBuildUrl do not support
                    //full URLs), but a full path from
                    //the root.
                    dir.splice(0, 3);

                    dir.pop();
                    dir = '/' + dir.join('/');
                }

                fileName = dir + fileName.substring(1);
            }

            return fileName;
        }
800475
def _render_filenames(filenames, zip_file, saltenv, template):
    '''
    
    '''
    if not template:
        return (filenames, zip_file)

    # render the path as a template using path_template_engine as the engine
    if template not in salt.utils.templates.TEMPLATE_REGISTRY:
        raise CommandExecutionError(
            'Attempted to render file paths with unavailable engine '
            '{0}'.format(template)
        )

    kwargs = {}
    kwargs['salt'] = __salt__
    kwargs['pillar'] = __pillar__
    kwargs['grains'] = __grains__
    kwargs['opts'] = __opts__
    kwargs['saltenv'] = saltenv

    def _render(contents):
        '''
        Render :param:`contents` into a literal pathname by writing it to a
        temp file, rendering that file, and returning the result.
        '''
        # write out path to temp file
        tmp_path_fn = salt.utils.files.mkstemp()
        with salt.utils.files.fopen(tmp_path_fn, 'w+') as fp_:
            fp_.write(salt.utils.stringutils.to_str(contents))
        data = salt.utils.templates.TEMPLATE_REGISTRY[template](
            tmp_path_fn,
            to_str=True,
            **kwargs
        )
        salt.utils.files.safe_rm(tmp_path_fn)
        if not data['result']:
            # Failed to render the template
            raise CommandExecutionError(
                'Failed to render file path with error: {0}'.format(
                    data['data']
                )
            )
        else:
            return data['data']

    filenames = _render(filenames)
    zip_file = _render(zip_file)
    return (filenames, zip_file)
1314490
def compile_file(fullpath, outfile_name, compiler_args):
    """"""
    if Options.VERBOSE:
        print '%s %s -> %s' % (strftime("%H:%M:%S"), fullpath, outfile_name)
    try:
        if Options.DEBUG:
            print "Compiling %s -> %s" % (fullpath, outfile_name)
        haml_lines = codecs.open(fullpath, 'r', encoding = 'utf-8').read().splitlines()
        compiler = hamlpy.Compiler(compiler_args)
        output = compiler.process_lines(haml_lines)
        outfile = codecs.open(outfile_name, 'w', encoding = 'utf-8')
        outfile.write(output)
    except Exception, e:
        # import traceback
        print "Failed to compile %s -> %s\nReason:\n%s" % (fullpath, outfile_name, e)
1276403
def from_file(filename)
      filename = filename.to_s

      if File.exists?(filename) && File.readable?(filename)
        self.instance_eval(IO.read(filename), filename, 1)
        self
      else
        raise IOError, "Could not open or read: '#{filename}'"
      end
    end
181301
function compileSingleFile (filePath, isDebug, options)
{
    var outputPath = "./" + path.dirname(filePath).replace(/(^|\/)assets\/js/, "$1public/js");
    var uglifyOptions = {};

    gulpUtil.log(gulpUtil.colors.blue("Uglify"), pathHelper.makeRelative(filePath), " -> ", pathHelper.makeRelative(outputPath) + "/" + path.basename(filePath));

    if (options.lint)
    {
        jsHintHelper.lintFile(filePath);
    }

    if (isDebug)
    {
        uglifyOptions.compress = false;
        uglifyOptions.preserveComments = "all";
    }

    return gulp.src(filePath)
        .pipe(plumber())
        .pipe(uglify(uglifyOptions))
        .pipe(gulp.dest(outputPath));
}