Then wait for the repository to be downloaded to your computer. Since the changes made to the template won't be pushed back, you can delete the `.git` diretory and all
Next, you'll want to modify the `composer.json` to reflect your template. Change the `name`, `description`, `keywords`, `homepage`, `license`, and `support` values
Next, you'll want to modify the `composer.json` to reflect your template. Change the `name`, `description`, `keywords`, `homepage`, `license`, and `support` values
to describe your new template. Also adjust the `require`, `require-dev`, `suggest`, and other options to match your template's requirements.
to describe your new template. Also adjust the `require`, `require-dev`, `suggest`, and other options to match your template's requirements.
> per file permissions to be set after an application is created using the template.
Next, actually modify the structure and contents of the application as you would like the default to be. Finally, update the README file to be applicable to your template.
接下来,真正的修改你的应用程序默认的目录结构和内容。最后,更新 README 文件以符合你的模板。
Make a Package
发布一个 Package
--------------
--------------
With the template defined, create a Git repository from it, and push your files there. If you're going to open source your template, [Github](http://github.com) is the best place to host it. If you intend to keep your template non-collaborative, any Git repository site will do.
Next, you need to register your package for Composer's sake. For public templates, the package should be registered at [Packagist](https://packagist.org/).
For private templates, it is a bit more tricky to register the package. For instructions, see the [Composer documentation](https://getcomposer.org/doc/05-repositories.md#hosting-your-own).
Use the Template
使用模板
------
------
That's all that's required to create a new Yii project template. Now you can create projects using your template:
以上就是为了创建一个新的 Yii 项目模板你需要做的事情。现在,你可以使用你自己的模板创建项目了:
```
```
composer global require "fxp/composer-asset-plugin:~1.0.0"
composer global require "fxp/composer-asset-plugin:~1.0.0"