Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #6 from experience/craft3
Browse files Browse the repository at this point in the history
Update for Craft 3. Closes #5.
  • Loading branch information
monooso authored Mar 31, 2018
2 parents ba37f78 + e336eb2 commit b012e1f
Show file tree
Hide file tree
Showing 130 changed files with 5,472 additions and 11,772 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# System files
# System
.DS_Store
/node_modules/
/tmp/

# Editor
/tags

# Package manager
vendor/
10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
language: php
php:
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- hhvm
- '7.2'
- nightly
install:
- composer install --prefer-dist -o -n -d src/smartdown
- composer install --prefer-dist -o -n -d src/tests
- composer install --prefer-dist -o -n
script:
- ./src/tests/vendor/bin/phpunit --configuration ./src/tests/phpunit.xml
- ./vendor/bin/codecept run
100 changes: 47 additions & 53 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,61 @@
# Change Log #
All notable changes to this project will be documented in this file. This
project adheres to [Semantic Versioning](http://semver.org/).
# Changelog

## [Unreleased] ##
### Fixed ###
- Tidy up README.
## 3.0.0 - 2018-03-31

## [2.1.0] - 2017-02-17 ##
### Added ###
### Added
- Update for Craft 3.

## 2.1.0 - 2017-02-17

### Added
- Add Travis CI configuration.
- Add documentation URL.
- Add schema version.
- Add releases feed.

### Changed ###
### Changed
- Reorganise plugin according to current best practices.
- Use present tense in CHANGELOG.

### Fixed ###
### Fixed
- Update parser to accept objects with a `__toString` method.

## [2.0.1] - 2016-01-02 ##
### Fixed ###
## 2.0.1 - 2016-01-01

### Fixed
- Fix copying of README in build process.

## [2.0.0] - 2016-01-01 ##
### Added ###
- Add change log.
- Add unit tests for all "utility" classes.
- Implement rudimentary build process.

### Changed ###
- Rename the plugin from SmartDown to Smartdown.
- Rename `SmartDownService` to `SmartdownService` (breaking change).
- Remove previously-deprecated `markdown` and `smartypants` Twig filter options.
- Update `michelf/php-markdown` dependency to version 1.6.
- Update `michelf/php-smartypants` dependency to version 1.6 (beta).

### Fixed ###
- Fix [issue 2][issue-2] by updating SmartyPants dependency.

[issue-2]: https://github.com/monooso/smartdown.craft-plugin/issues/2

## [1.0.0] - 2015-07-30 ##
### Added ###
- Add `SmartDownService`, accessible via `craft()->smartDown`, so third-parties can share the love.
- Add `modifySmartdownMarkupInput` hook.
- Add `modifySmartdownMarkupOutput` hook.
- Add `modifySmartdownTypographyInput` hook.
- Add `modifySmartdownTypographyOutput` hook.

### Changed ###
- Deprecate `markdown` Twig filter option; use `markup` instead.
- Deprecate `smartypants` Twig filter option; use `typography` instead.

## 0.1.0 - 2013-08-21 ##
Initial release.

### Added ###
- Add `smartdown` Twig filter, which runs a string through "Markdown Extra" and "SmartyPants" parsers.

[Unreleased]: https://github.com/monooso/smartdown.craft-plugin/compare/2.1.0...HEAD
[2.1.0]: https://github.com/monooso/smartdown.craft-plugin/compare/2.1.0...2.0.1
[2.0.1]: https://github.com/monooso/smartdown.craft-plugin/compare/2.0.0...2.0.1
[2.0.0]: https://github.com/monooso/smartdown.craft-plugin/compare/1.0.0...2.0.0
[1.0.0]: https://github.com/monooso/smartdown.craft-plugin/compare/0.1.0...1.0.0
## 2.0.0 - 2015-12-31

### Added
- Add CHANGELOG
- Implement unit tests for 'utility' classes.
- Implement build process.

### Changed
- Rename plugin from SmartDown to Smartdown. Beware case-insensitive version control systems.
- Rename 'SmartDownService' to 'SmartdownService'.
- Remove deprecated 'markdown' and 'smartypants' Twig filter options.
- Update MarkdownExtra to version 1.6.
- Update SmartyPants to version 1.6 beta

### Fixed
- Fix issue with SmartyPants dependency containing errant '.git' folder

## 1.0.0 - 2015-07-29

### Added
- Add 'SmartDownService'.
- Add 'modifySmartdownMarkupInput' hook.
- Add 'modifySmartdownMarkupOutput' hook.
- Add 'modifySmartdownTypographyInput' hook.
- Add 'modifySmartdownTypographyOutput' hook.

### Changed
- Deprecate 'markdown' Twig filter option. Use 'markup' instead.
- Deprecate 'smartypants' Twig filter option. Use 'typography' instead.

## 0.1.0 - 2013-08-20

### Added
- Add 'smartdown' Twig filter, which runs a string through MarkdownExtra and SmartyPants.
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) Experience

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 changes: 0 additions & 32 deletions LICENSE.txt

This file was deleted.

25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,31 @@ Craft already supports standard Markdown, but sadly standard Markdown doesn't su
Smartdown plugs both of these gaps, turning your website into a typographic dreamboat.

## Requirements ##
Each release of Smartdown is [automatically tested][travis] against PHP 5.5 and above. It is also manually tested on the most recent version of Craft.
Each release of Smartdown is [automatically tested][travis] against PHP 7.1 and above. It's also manually tested on the most recent version of Craft.

[travis]: https://travis-ci.org/experience/smartdown.craft-plugin "See the Smartdown build status on Travis CI"

### PHP 7.0 support ###
In theory, Smartdown _should_ be compatible with PHP 7.0. In practise, it's impossible to test this, because the Codeception dependency tree includes components which only work with PHP 7.1+.

Unfortunately there's nothing we can do about that.

## Installation ##
1. [Download the latest release][download], and unzip it.
2. Copy the `smartdown` folder to your `craft/plugins` directory.
3. Navigate to the "Admin → Settings → Plugins" page, and activate Smartdown.
To install Smartdown, either search for "Smartdown" in the Craft Plugin Store, or add it as a [Composer][composer] dependency.

[composer]: https://getcomposer.org "Composer is a PHP dependency manager"

Here's how to install Smartdown using Composer.

1. Open your terminal, and navigate to your Craft project:

cd /path/to/project

2. Add Smartdown as a project dependency:

composer require experience/smartdown

[download]: https://github.com/experience/smartdown.craft-plugin/releases/latest "Download the latest release"
3. In the Control Panel, go to "Settings → Plugins", and click the "Install" button for Smartdown

## Basic usage ##
Use the Smartdown filter in exactly the same way as any other Twig filter.
Expand Down
13 changes: 13 additions & 0 deletions codeception.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
paths:
tests: tests
output: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
actor_suffix: Tester
extensions:
enabled:
- Codeception\Extension\RunFailed
settings:
bootstrap: _bootstrap.php
colors: true
42 changes: 42 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "experience/smartdown",
"description": "Bringing the unbridled joy of Markdown Extra and Smartypants to your Craft websites.",
"version": "3.0.0",
"type": "craft-plugin",
"minimum-stability": "dev",
"prefer-stable" : true,
"require": {
"php": "^7.1.0",
"michelf/php-markdown": "^1.8",
"michelf/php-smartypants": "^1.8"
},
"autoload": {
"psr-4": {
"experience\\smartdown\\": "src/",
"experience\\smartdown\\tests\\": "tests/"
}
},
"support": {
"email": "[email protected]"
},
"extra": {
"changelogUrl": "https://github.com/experience/smartdown.craft-plugin/blob/master/CHANGELOG.md",
"components": {
"smartdown": "experience\\smartdown\\services\\Smartdown"
},
"documentationUrl": "https://github.com/experience/smartdown.craft-plugin/blob/master/README.md",
"class": "experience\\smartdown\\Smartdown",
"developer": "Experience",
"developerUrl": "https://experiencehq.net",
"downloadUrl": "https://github.com/experience/smartdown.craft-plugin/archive/master.zip",
"handle": "smartdown",
"hasCpSection": false,
"hasSettings": false,
"name": "Smartdown",
"sourceLanguage": "en-GB"
},
"require-dev": {
"codeception/codeception": "dev-master",
"craftcms/cms": "^3.0.0-RC1"
}
}
Loading

0 comments on commit b012e1f

Please sign in to comment.