From cd16dfd36e38887045a9e7cc5f582d07082229e7 Mon Sep 17 00:00:00 2001 From: Jon Park Date: Thu, 22 Jan 2015 10:50:22 +0000 Subject: [PATCH] Adding supporting docs --- CHANGELOG.md | 7 +++++ CONTRIBUTING.md | 32 +++++++++++++++++++++ README.md | 61 +++++++++++++++++++++++++++++++++++++++++ composer.json | 4 +-- src/ServiceProvider.php | 2 +- 5 files changed, 103 insertions(+), 3 deletions(-) create mode 100755 CHANGELOG.md create mode 100755 CONTRIBUTING.md create mode 100755 README.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100755 index 0000000..494a2bb --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +All Notable changes to `clicksco/commonmark-laravel` will be documented in this file + +## 1.0 - 2015-01-22 + +Initial version diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100755 index 0000000..0a0f596 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,32 @@ +# Contributing + +Contributions are **welcome** and will be fully **credited**. + +We accept contributions via Pull Requests on [Github](https://github.com/Clicksco/CommonMark). + + +## Pull Requests + +- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer). + +- **Add tests!** - Your patch won't be accepted if it doesn't have tests. + +- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. + +- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. + +- **Create feature branches** - Don't ask us to pull from your master branch. + +- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. + +- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting. + + +## Running Tests + +``` bash +$ phpunit +``` + + +**Happy coding**! diff --git a/README.md b/README.md new file mode 100755 index 0000000..3fd2c87 --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +# CommonMark Laravel 4 Wrapper + + +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) + + +Trivial Laravel 4 wrapper class for The PHP League's CommonMark package. + +## Install + +Require the package with Composer + +``` bash +$ composer require clicksco/commonmark-laravel +``` + +Update app/config/app.php with the ServiceProvider and Facade + +``` php +'providers' => [ + ... + 'Clicksco\CommonMark\ServiceProvider', + ... +]; +``` + +``` php +'aliases' => [ + ... + 'CommonMark' => 'Clicksco\CommonMark\Facade', + ... +]; +``` + +## Usage + +``` php +echo CommonMark::convertToHtml('# Hello, World!'); +``` + +## Testing + +``` bash +$ phpunit +``` + +## Contributing + +Please see [CONTRIBUTING](https://github.com/clicksco/commonmarklaravel/blob/master/CONTRIBUTING.md) for details. + +## Credits + +- [Jon Park](https://github.com/jonspark) +- [All Contributors](https://github.com/clicksco/commonmarklaravel/contributors) + +## License + +The MIT License (MIT). Please see [License File](LICENSE.md) for more information. diff --git a/composer.json b/composer.json index c862d89..9c89f36 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,11 @@ { "name": "clicksco/commonmark-laravel", - "description": "Simple Laravel wrapper class for League\\CommonMark", + "description": "Trivial Laravel wrapper class for League\\CommonMark", "keywords": [ "laravel", "commonmark" ], - "homepage": "https://github.com/clicksco/commonmark-laravel", + "homepage": "https://github.com/Clicksco/CommonMarkLaravel", "license": "MIT", "authors": [ { diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index a249199..0c6f24b 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -33,7 +33,7 @@ public function provides() public function register() { $this->app->bindShared('clicksco.commonmark', function($app) { - return new CommonMarkConverter; + return new CommonMarkConverter(); }); } }