build - Builds the elm app with the current language.

@param  {type} outputDir The directory to which the elm build should be written.
Files will be named according to the current language
434215
function build(outputDir) {
    let exec = require("child_process").exec;
    let elmFile = path.join(argv.src, argv.elmFile);
    let cmd = "elm-make " + elmFile + " --yes --output " + argv.output + "/" + argv.language + ".js";
    console.log(cmd);
    exec(cmd, (err, stdout, stderr) => {
        if(err) {
            console.error(err);
            return;
        }
        console.log(stdout);
    });
}
1035814
def init_argparser_build_dir(
            self, argparser, help=(
                'the build directory, where all sources will be copied to '
                'as part of the build process; if left unspecified, the '
                'default behavior is to create a new temporary directory '
                'that will be removed upon conclusion of the build; if '
                'specified, it must be an existing directory and all files '
                'for the build will be copied there instead, overwriting any '
                'existing file, with no cleanup done after.'
            )):
        

        argparser.add_argument(
            '--build-dir', default=None, dest=BUILD_DIR,
            metavar=metavar(BUILD_DIR), help=help,
        )
747666
function Buildit(opts) {
	opts = opts || {};

	this.cwd = opts.baseUrl || process.cwd();
	this.name = opts.name;
	this.locals = {};
	this.externals = [];

	if (opts.define) {
		this.define = opts.define;
	}

	if (opts.exports) {
		this.exports = opts.exports;
	}

	if (opts.extensions) {
		this.extensions = opts.extensions;
	}
}
351692
def build(ctx, builder="html", options=""):
    """"""
    sourcedir = ctx.config.sphinx.sourcedir
    destdir = Path(ctx.config.sphinx.destdir or "build")/builder
    destdir = destdir.abspath()
    with cd(sourcedir):
        destdir_relative = Path(".").relpathto(destdir)
        command = "sphinx-build {opts} -b {builder} {sourcedir} {destdir}" \
                    .format(builder=builder, sourcedir=".",
                            destdir=destdir_relative, opts=options)
        ctx.run(command)
632750
function build(options) {
  options = Object.assign({}, options)

  return resolveStyleguide(options)
  .then(function (styleguide) {
    success('Styleguide.write:', 'start writing ...')
    return styleguide.write()
  })
  .then(function (styleguide) {
    success('Styleguide.write:', 'finished writing')
    return styleguide
  })
  .catch(function (e) {
    error('Cli.build', 'failed to build Styleguide', e)
    throw (e)
  })
}
259095
function createForBuild(build) {
  var exports = {};
  
  function bundles(name, sourceType) {
    /*jshint validthis: true */
    var ml = build.bundles(name, sourceType);
    return this.markSafe(ml);
  }
  exports.bundles = bundles;
  
  function link(srcPath, relative) {
    /*jshint validthis: true */
    var ml = build.link(srcPath, relative);
    return this.markSafe(ml);
  }
  exports.link = link;
  
  function script(srcPath, relative) {
    /*jshint validthis: true */
    var ml = build.script(srcPath, relative);
    return this.markSafe(ml);
  }
  exports.script = script;
  
  function scriptCode(js) {
    /*jshint validthis: true */
    var ml = '<script type="text/javascript">' + js + '</script>';
    return this.markSafe(ml);
  }
  exports.scriptCode = scriptCode;

  exports.t = build.translate.bind(build);
  exports.tn = build.translateNumeric.bind(build);

  return exports;
}
452782
function runProtractorAoT(appDir, outputFile) {
  fs.appendFileSync(outputFile, '++ AoT version ++\n');
  const aotBuildSpawnInfo = spawnExt('yarn', ['build:aot'], {cwd: appDir});
  let promise = aotBuildSpawnInfo.promise;

  const copyFileCmd = 'copy-dist-files.js';
  if (fs.existsSync(appDir + '/' + copyFileCmd)) {
    promise = promise.then(() => spawnExt('node', [copyFileCmd], {cwd: appDir}).promise);
  }
  const aotRunSpawnInfo = spawnExt('yarn', ['serve:aot'], {cwd: appDir}, true);
  return runProtractorSystemJS(promise, appDir, aotRunSpawnInfo, outputFile);
}
695088
def build(content_directory=None, out_directory=None):
    """"""
    content_directory = content_directory or '.'
    out_directory = os.path.abspath(out_directory or default_out_directory)
    repo = require_repo(content_directory)

    # Prevent user mistakes
    if out_directory == '.':
        raise ValueError('Output directory must be different than the source directory: ' + repr(out_directory))
    if os.path.basename(os.path.relpath(out_directory, content_directory)) == '..':
        raise ValueError('Output directory must not contain the source directory: ' + repr(out_directory))

    # TODO: read config
    # TODO: use virtualenv
    # TODO: init and run plugins
    # TODO: process with active theme

    # Collect and copy static files
    files = presentation_files(repo)
    remove_directory(out_directory)
    copy_files(files, out_directory, repo)

    return out_directory
871443
protected function runBuildTask($sourceDir, $outputDir)
    {
        $buildTime = $this->runTimedTask(function () use ($sourceDir, $outputDir) {
            $this->builder->build($sourceDir, $outputDir);
        });

        $this->output->writeln(
            "<comment>PHP built in <time>{$buildTime}ms</time></comment>",
            OutputInterface::VERBOSITY_VERBOSE
        );
    }
118619
private void initOutputDir(File outputDir) {

        if (!outputDir.exists()) {
            if (!outputDir.mkdirs()) {
                throw new IllegalArgumentException("Output Directory "+outputDir+" could not be created");
            }
        }
        if (!outputDir.isDirectory() || (!outputDir.canWrite())) {
            throw new IllegalArgumentException("Output Directory "+outputDir+" is not a directory or cannot be written to.");
        }
    }
258352
def prepare_build_dir(self):
        ''''''
        self.build_dir = self.get_build_dir()
        self.common_dir = self.get_common_dir()
        copy_files(join(self.bootstrap_dir, 'build'), self.build_dir)
        copy_files(join(self.common_dir, 'build'), self.build_dir,
                   override=False)
        if self.ctx.symlink_java_src:
            info('Symlinking java src instead of copying')
            shprint(sh.rm, '-r', join(self.build_dir, 'src'))
            shprint(sh.mkdir, join(self.build_dir, 'src'))
            for dirn in listdir(join(self.bootstrap_dir, 'build', 'src')):
                shprint(sh.ln, '-s', join(self.bootstrap_dir, 'build', 'src', dirn),
                        join(self.build_dir, 'src'))
        with current_directory(self.build_dir):
            with open('project.properties', 'w') as fileh:
                fileh.write('target=android-{}'.format(self.ctx.android_api))
1366126
def build_directory():
    '''
    
    '''
    if os.path.exists('locale'):
        pass
    else:
        os.mkdir('locale')
    if os.path.exists(WHOOSH_DB_DIR):
        pass
    else:
        os.makedirs(WHOOSH_DB_DIR)
343847
function buildScriptsAndStyleFiles(outputPath) {
	const stylesRegex = /<style>|<\/style>/gi,
		scriptsRegex = /<script type="text\/javascript">|<\/script>/gi;

	// creates the report directory if it doesn't exist
	if (!fs.existsSync(outputPath)) {
		fs.mkdirSync(outputPath);
	}

	// create the styles.css and main.js files
	writeFile(`${outputPath}styles.css`, styles(), stylesRegex);
	writeFile(`${outputPath}main.js`, scripts(), scriptsRegex);
}
1307581
def build(self, **kw):
        """"""
        global MkdirBuilder
        if self.builder is not MkdirBuilder:
            SCons.Node.Node.build(self, **kw)
1095999
function build (stream) {
  return stream
    .pipe(plumber())
    .pipe(tap((file) => {
      log.start('build')
        .action('Building JS file')
        .data(paths.fromJs(file.path))
        .send();
    }))
    .pipe(babel(config))
    .pipe(gulp.dest(paths.get.js.dest))
    .pipe(tap((file) => {
      log.success('build')
        .action('Compiled JS File')
        .data(paths.from(paths.get.js.dest, file.path))
        .send();
    }));
}
123657
public function build()
	{
		$this->setLayout( 'locales/index.tpl' );
		$this->addModule( 'head', 'SharedHead' );
		$this->addModule( 'footer', 'SharedFooter' );
		$this->addModule( 'system_messages', 'SharedSystemMessages' );
		
		$params = $this->getParams();
		$action = \Sifo\Router::getReversalRoute( $params['path_parts'][0] );

		$params = $this->getParams();

		
		if ( $params['params'] !== false && in_array('saved-true', $params["params"]))
		{
			\Sifo\FlashMessages::set( 'File Saved OK.', \Sifo\FlashMessages::MSG_OK );
		}
		if ( $params['params'] !== false && in_array('created-true', $params["params"]))
		{
			\Sifo\FlashMessages::set( 'File Created OK.', \Sifo\FlashMessages::MSG_OK );
		}


		if ($this->getParsedParam( 'instance' ) !== false)
		{
			$this->assign('current_instance', $this->getParsedParam( 'instance' ));
			$this->assign('languages', $this->getLanguagesInstance($this->getParsedParam( 'instance' )));
			//var_dump($this->getLanguagesInstance($this->getParsedParam( 'instance' )));
		}
		if ($this->getParsedParam( 'language' ) !== false)
		{
			$this->assign('current_language', $this->getParsedParam( 'language' ));
			$temp = explode("_", $this->getParsedParam( 'language' ));
			if (  is_array( $temp))
			{
				$this->assign('lang', $temp[1]);
			}
		}

		$instances = $this->getInstances();
		$this->assign('instances', $instances);
		// For url with params generation:
		$this->assign( 'params', $this->getParam( 'parsed_params' ) );
		$this->assign( 'params_definition', $this->getParamsDefinition() );
	}
1115837
async function flowBuildPlugin(pkg, options) {
  const buildOutputRoot = path.resolve(
    pkg.paths.root,
    options.outputDir || './build',
  )
  const patterns = (
    options.inputs || ['**/*.js', '!__tests__', '!test.js']
  ).concat(['!node_modules/**/*', `!${path.basename(buildOutputRoot)}/**/*`])
  const sourceRoot =
    options.sourceDir != null
      ? path.resolve(pkg.paths.root, options.sourceDir)
      : pkg.paths.root

  // :: string -> Array<string>
  const getJsFilePaths = () =>
    globby(patterns, {
      cwd: sourceRoot,
    })

  const filePaths = await getJsFilePaths()

  // :: string -> Promise<void>
  const transpileFile = filePath =>
    new Promise(resolve => {
      const module = path.resolve(sourceRoot, filePath)
      const input = fs.readFileSync(module, 'utf8')
      const output = flowRemoveTypes(input)
      const outFile = path.resolve(buildOutputRoot, filePath)
      ensureParentDirectoryExists(outFile)
      fs.writeFileSync(outFile, output.toString(), { encoding: 'utf8' })
      fs.writeFileSync(`${outFile}.flow`, input, { encoding: 'utf8' })
      resolve()
    })

  const limit = pLimit(maxConcurrentTranspiles)
  const queueTranspile = filePath => limit(() => transpileFile(filePath))
  await Promise.all(R.map(queueTranspile, filePaths))
}