ianl28/starter-files
Composer 安装命令:
composer require ianl28/starter-files
包简介
PHP class library to run as script from Composer in order to create the starter files for a PHP project.
README 文档
README
This is a simple utility run after the Composer init command, that creates the essential starter files for a project, namely, the ./src/Class.php, ./README.md, ./LICENSE.md (MIT), ./CONTRIBUTING.md, ./CHANGELOG.md, ./.gitignore, ./src/test.php and ./src/servephp.sh.
Compatibility
Tested up to PHP 7, should be compatible with PHP 5.3 or above
Installation
The following instructions are used to create a new PHP project from scratch using ianl28/starter-files:
- Create a new folder for the new project by entering mkdir newproj
- Navigate into the new folder cd newproj
- Create a new composer.json file by entering composer init
- Enter the necessary values. Ensure that the minimum stability is set to dev.
- Ensure that the internet is connected
- Run composer require ianl28/starter-files
- Then add these lines to your composer.json:
"scripts": { "post-status-cmd": "Ianl28\\StarterFiles\\StarterFiles::run" },
- Then run composer status
- The following files should then be created: ./index.php, ./README.md, ./LICENSE.md, ./CONTRIBUTING.md, ./.gitignore, ./src/Newproj.php, ./src/test.sh, ./src/servephp.sh
- Then add these lines to your composer.json:
"autoload": { "psr-4": { "Namespace\\Newproj\\": "src/" } },
- Then run composer update
- To start the PHP server and serve ./index.php on the browser, cd ./src, and then enter servephp.sh, and then point the browser to localhost:3000
- Alternatively, the class Newproj may be run from ./ as php index.php or from ./src as php test.php
Change Log
Please see CHANGELOG for more information on the recent changes.
Contribute
Please see CONTRIBUTING for details.
Credits
- Ian Low (ianlow28@gmail.com)
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 46
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 13
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-12