Create a new project using `composer create-project acquia/blt-project`.

@option base-branch The blt-project (NOT blt) branch to test.
@option project-dir The directory in which the test project will be
created.
@option vm Whether a VM will be booted.
432011
public function createFromBltProject($options = [
    'base-branch' => self::BLT_DEV_BRANCH,
    'project-dir' => self::BLT_PROJECT_DIR,
  ]) {
    $test_project_dir = $this->bltRoot . "/" . $options['project-dir'];
    $this->prepareTestProjectDir($test_project_dir);
    $this->yell("Creating project from acquia/blt-project:{$options['base-branch']}-dev.");
    $return = $this->taskExecStack()
      ->dir($this->bltRoot . "/..")
      ->exec("COMPOSER_PROCESS_TIMEOUT=2000 composer create-project acquia/blt-project:{$options['base-branch']}-dev blted8 --no-interaction")
      ->run();

    return $return;
  }
94705
def tarbell_newproject(command, args):
    
    with ensure_settings(command, args) as settings:
        # Set it up and make the directory
        name = _get_project_name(args)
        puts("Creating {0}".format(colored.cyan(name)))
        path = _get_path(name, settings)
        _mkdir(path)

        try:
            _newproject(command, path, name, settings)
        except KeyboardInterrupt:
            _delete_dir(path)
            show_error("ctrl-c pressed, not creating new project.")
        except:
            _delete_dir(path)
            show_error("Unexpected error: {0}".format(sys.exc_info()[0]))
            raise
478693
def create(project, skel):
    

    app = project_name(project)

    header("Create New Project ...")
    print("- Project: %s " % app)

    create_project(app, skel)
    print("")
    print("----- That's Juicy! ----")
    print("")
    print("- Your new project [ %s ] has been created" % app)
    print("- Location: [ application/%s ]" % app)
    print("")
    print("> What's next?")
    print("- Edit the config [ application/config.py ] ")
    print("- If necessary edit and run the command [ juicy setup ]")
    print("- Launch app on devlopment mode, run [ juicy serve %s ]" % app)
    print("")
    print("*" * 80)
118259
def create_new_project(self):
        """"""
        self.switch_to_plugin()
        active_project = self.current_active_project
        dlg = ProjectDialog(self)
        dlg.sig_project_creation_requested.connect(self._create_project)
        dlg.sig_project_creation_requested.connect(self.sig_project_created)
        if dlg.exec_():
            if (active_project is None
                    and self.get_option('visible_if_project_open')):
                self.show_explorer()
            self.sig_pythonpath_changed.emit()
            self.restart_consoles()
297041
public function main()
    {
        if (null === $this->getRepository()) {
            throw new BuildException('"repository" is required parameter');
        }
        if (null === $this->getBranchname()) {
            throw new BuildException('"branchname" is required parameter');
        }

        $client = $this->getGitClient(false, $this->getRepository());
        $command = $client->getCommand('checkout');
        $command
            ->setOption('no-track', $this->isNoTrack())
            ->setOption('q', $this->isQuiet())
            ->setOption('force', $this->isForce())
            ->setOption('b', $this->isCreate())
            ->setOption('B', $this->isForceCreate())
            ->setOption('m', $this->isMerge());
        if ($this->isNoTrack()) {
            $command->setOption('track', $this->isTrack());
        }

        $command->addArgument($this->getBranchname());

        if (null !== $this->getStartPoint()) {
            $command->addArgument($this->getStartPoint());
        }

        $this->log('git-checkout command: ' . $command->createCommandString(), Project::MSG_INFO);

        try {
            $output = $command->execute();
        } catch (Exception $e) {
            throw new BuildException('Task execution failed.', $e);
        }

        $this->log(
            sprintf('git-checkout: checkout "%s" repository', $this->getRepository()),
            Project::MSG_INFO
        );
        $this->log('git-checkout output: ' . str_replace('\'', '', trim($output)), Project::MSG_INFO);
    }
804178
public function setupProject()
    {
        $this->taskWriteToFile(ProjectX::projectRoot() . '/.gitignore')
            ->text($this->loadTemplateContents('.gitignore.txt'))
            ->place('PROJECT_ROOT', $this->getInstallRoot(true))
            ->run();

        return $this;
    }
1179112
public function behat() {
    $copy_map = [
      $this->getConfigValue('blt.root') . '/template/tests/behat/behat.yml' => $this->getConfigValue('repo.root') . '/tests/behat/behat.yml',
      $this->getConfigValue('blt.root') . '/template/tests/behat/example.local.yml' => $this->defaultBehatLocalConfigFile,
      $this->defaultBehatLocalConfigFile => $this->projectBehatLocalConfigFile,
    ];

    $task = $this->taskFilesystemStack()
      ->stopOnFail()
      ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE);

    // Copy files without overwriting.
    foreach ($copy_map as $from => $to) {
      if (file_exists($to)) {
        unset($copy_map[$from]);
      }
    }

    if ($copy_map) {
      $this->say("Generating Behat configuration files...");
      foreach ($copy_map as $from => $to) {
        $task->copy($from, $to);
      }
      $result = $task->run();
      foreach ($copy_map as $from => $to) {
        $this->getConfig()->expandFileProperties($to);
      }

      if (!$result->wasSuccessful()) {
        $filepath = $this->getInspector()->getFs()->makePathRelative($this->defaultBehatLocalConfigFile, $this->getConfigValue('repo.root'));
        throw new BltException("Unable to copy $filepath into your repository.");
      }
    }
  }
438483
public function addToProject() {
    $this->initializeBlt();
    $this->displayArt();
    $this->yell("BLT has been added to your project.");
    $this->say("This required a full `composer update`.");
    $this->say("BLT has added and modified various project files.");
    $this->say("Please inspect your repository.");
  }
785288
protected function executeBltUpdate($version) {
    $options = $this->getOptions();

    if ($this->isInitialInstall()) {
      $this->io->write('<info>Creating BLT templated files...</info>');
      if ($this->isNewProject()) {
        // The BLT command will not work at this point because the .git dir doesn't exist yet.
        $command = $this->getVendorPath() . '/acquia/blt/bin/blt internal:create-project --ansi';
      }
      else {
        $command = $this->getVendorPath() . '/acquia/blt/bin/blt internal:add-to-project --ansi -n';
      }
      $success = $this->executeCommand($command, [], TRUE);
      if (!$success) {
        $this->io->writeError("<error>BLT installation failed! Please execute <comment>$command --verbose</comment> to debug the issue.</error>");
        throw new \Exception('Installation aborted due to error');
      }
    }
    elseif ($options['blt']['update']) {
      $this->io->write('<info>Updating BLT templated files...</info>');
      $success = $this->executeCommand('blt blt:update --ansi --no-interaction', [], TRUE);
      if (!$success) {
        $this->io->writeError("<error>BLT update script failed! Run `blt blt:update --verbose` to retry.</error>");
      }
    }
    else {
      $this->io->write('<comment>Skipping update of BLT templated files</comment>');
    }
  }
1157626
public function main()
    {
        if ($this->testIfCondition() && $this->testUnlessCondition()) {
            foreach ($this->children as $o) {
                if ($o instanceof Task) {
                    // child is a task
                    $o->perform();
                } elseif ($o instanceof RuntimeConfigurable) {
                    // child is a RuntimeConfigurable
                    $o->maybeConfigure($this->project);
                }
            }
        } elseif (!$this->testIfCondition()) {
            $this->project->log(
                "Skipped target '" . $this->name . "' because property '" . $this->ifCondition . "' not set.",
                $this->getLogSkipped() ? Project::MSG_INFO : Project::MSG_VERBOSE
            );
        } else {
            $this->project->log(
                "Skipped target '" . $this->name . "' because property '" . $this->unlessCondition . "' set.",
                $this->getLogSkipped() ? Project::MSG_INFO : Project::MSG_VERBOSE
            );
        }
    }
553468
public function initBehat()
    {
        $root_path = ProjectX::projectRoot();

        if ($this->hasBehat()
            && !file_exists("$root_path/tests/Behat/features")) {
            $this->taskBehat()
                ->option('init')
                ->option('config', "{$root_path}/tests/Behat/behat.yml")
                ->run();
        }

        return $this;
    }
929666
def create_api_module
      File.open("#{@project_name}/app/apis/#{@project_name}/base.rb", "w") do |f|
        f.write('module ') 
        f.puts(@module_name)
        f.write("\tclass Base < Grape::API\n\tend\nend")
      end
      $stdout.puts "\e[1;32m \tcreate\e[0m\tapp/apis/#{@project_name}/base.rb"
    end
1140864
public function setupBehat()
    {
        $root_path = ProjectX::projectRoot();
        $behat_path = "{$root_path}/tests/Behat/behat.yml";

        $this->taskFilesystemStack()
            ->mkdir("{$root_path}/tests/Behat", 0775)
            ->copy($this->getTemplateFilePath('tests/behat.yml'), $behat_path)
            ->run();

        $this->composer->addRequires([
            'behat/behat' => static::BEHAT_VERSION,
        ], true);

        return $this;
    }
55655
function create(opts) {	
	function absolute_path(arg_path) {
		return path.resolve(process.cwd(), arg_path);
	}
	
	// Parse arguments
	function parse_with_flag(flag) {
		return function(arg) {
			var parts = arg.split(":");
			if(parts.length < 2) {
				parts.unshift(null);
			}
			
			return {name: parts[0], path: absolute_path(parts[1]), flag: flag};
		}
	}

	opts.l = ((opts.l && opts.l !== true) ? [].concat(opts.l) : []).map(parse_with_flag("l"));
	opts.b = ((opts.b && opts.b !== true) ? [].concat(opts.b) : []).map(parse_with_flag("b"));
	opts.s = ((opts.s && opts.s !== true) ? [].concat(opts.s) : []).map(parse_with_flag("s"));
	if(!opts.j) {
		opts.x = ((opts.x && opts.x !== true) ? [].concat(opts.x) : []).map(parse_with_flag("x"));
	}
	opts._ = opts._.map(parse_with_flag(""));
	
	// Merge all arguments
	var args;
	if(!opts.j) {
		args = opts.l.concat(opts.b).concat(opts.s).concat(opts._).concat(opts.x);
	} else {
		args = opts._;
	}
	
	if(args.length === 0) {
		throw new Error("no input file");
	}
	
	// Determine link root
	var bundle_root;
	if(args.length < 2) {
		bundle_root = path.dirname(args[0].path);
	} else if(!opts.j) {
		bundle_root = args.reduce(function(arg1, arg2) {
			var path1 = (typeof arg1 === "string") ? arg1 : arg1.path;
			var path2 = arg2.path;
			
			var i = 0;
			for(; i < path1.length && path1.charAt(i) === path2.charAt(i); i++);
			return path1.slice(0, i);
		});
	}

	// Bundle
	var bundle = new Bundle
	
	var symbols_loaded = {};
	var join = [];
	if(typeof opts.j !== "string") {
		opts.j = false;
	}
	
	// Load symbols
	function load_symbol(symbol) {
		// Merge bundle
		if(symbol.flag === "l") {
			var sub = new Bundle(symbol.path);
			for(var subsym_name in sub.symbols()) {
				var subsym = sub.symbol(subsym_name);
				
				// Merge prefix
				if(symbol.name === null) {
					var subpath = path.dirname(symbol.path);
					var prefix = path.relative(bundle_root, subpath);
					if(prefix !== "") {
						prefix += "/";
					}
					symbol.name = prefix;
				}
				
				subsym_name = symbol.name + subsym_name;
				subsym.path = symbol.name + subsym.path;
				
				bundle.addSymbol(subsym_name, subsym.data, subsym.path, subsym.flag);
			}
			return;
		}
		
		var data = fs.readFileSync(symbol.path, (symbol.flag === "b" ? "base64" : "utf8"));
		
		if(opts.c && (symbol.flag === "" || symbol.flag === "x")) {
			// Remove shebang
			data = data.replace(/^\#\!.*/, "");
			if(!opts.j) {
				data = compress(data, {
					debug: opts.d
				});
			}
		}
		
		if(opts.j) {
			join.push(data);
			return;
		}
		
		var sym_path = path.relative(bundle_root, symbol.path);
		if(!symbol.name) {
			symbol.name = opts.f ? path.basename(sym_path) : sym_path;
		}
		
		if(symbols_loaded[symbol.name]) {
			warning("symbol collision on " + symbol.name, opts);
			bundle.removeSymbol(symbol.name);
		} else {
			symbols_loaded[symbol.name] = true;
		}
		
		bundle.addSymbol(symbol.name, data, sym_path, symbol.flag);
	}
	
	args.forEach(load_symbol);
	
	// Handle join
	if(opts.j) {
		var data = join.join(";\n");
		if(opts.c) {
			data = compress(data, {
				debug: opts.d
			});
		}
		bundle.addSymbol(opts.j, data, opts.j, (opts.x ?  "x" : ""));
	}
	
	do_compile(bundle, opts);
}
736001
public function travisInit() {
    $result = $this->taskFilesystemStack()
      ->copy($this->getConfigValue('blt.root') . '/scripts/travis/.travis.yml', $this->getConfigValue('repo.root') . '/.travis.yml', TRUE)
      ->stopOnFail()
      ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE)
      ->run();

    if (!$result->wasSuccessful()) {
      throw new BltException("Could not initialize Travis CI configuration.");
    }

    $this->say("<info>A pre-configured .travis.yml file was copied to your repository root.</info>");
  }
609083
private void createProject() {

        CmsObject cms = A_CmsUI.getCmsObject();
        try {
            String name = "/";
            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_fieldOU.getValue())) {
                name = CmsStringUtil.joinPaths(name, m_fieldOU.getValue());
            }
            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_fieldName.getValue())) {
                name = CmsStringUtil.joinPaths(name, m_fieldName.getValue());
            } else {
                name = CmsStringUtil.joinPaths(name, "/");
            }

            m_project = cms.createProject(
                name,
                m_fieldDescription.getValue(),
                m_fieldUser.getValue(),
                m_fieldManager.getValue(),
                m_fieldDeleteAfterPublish.getValue().booleanValue()
                ? CmsProject.PROJECT_TYPE_TEMPORARY
                : CmsProject.PROJECT_TYPE_NORMAL);
            updateProjectResources();

        } catch (Throwable t) {
            CmsErrorDialog.showErrorDialog(t);
        }
    }
559967
private static IProject createBaseProject(String projectName, URI location)
	{
		// it is acceptable to use the ResourcesPlugin class
		IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);

		if (!newProject.exists())
		{
			URI projectLocation = location;
			IProjectDescription desc = newProject.getWorkspace().newProjectDescription(newProject.getName());

			if (location != null
					|| ResourcesPlugin.getWorkspace().getRoot().getLocationURI().equals(location))
			{
				projectLocation = null;
			}

			desc.setLocationURI(projectLocation);
			try
			{
				newProject.create(desc, null);
				if (!newProject.isOpen())
				{
					newProject.open(null);
				}
			} catch (CoreException e)
			{
				VdmCore.log("VdmModelManager createBaseProject", e);
			}
		}

		return newProject;
	}