forked from yiisoft/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '13064-asset-packagist-docs'
- Loading branch information
Showing
7 changed files
with
185 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,34 +22,38 @@ The first step is to clone the basic Yii template's Git repository: | |
git clone [email protected]:yiisoft/yii2-app-basic.git | ||
``` | ||
|
||
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` directory and all | ||
of its contents from the download. | ||
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` directory and all of its contents from the download. | ||
|
||
Modify the Files | ||
------------ | ||
|
||
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. | ||
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. | ||
|
||
> Note: In the `composer.json` file, use the `writable` parameter under `extra` to specify | ||
> 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. | ||
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. | ||
|
||
Make a 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. | ||
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). | ||
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: | ||
|
||
``` | ||
composer global require "fxp/composer-asset-plugin:^1.3.1" | ||
composer create-project --prefer-dist --stability=dev mysoft/yii2-app-coolone new-project | ||
``` |
Oops, something went wrong.