diff --git a/docs/changelog.md b/docs/changelog.md deleted file mode 100644 index 5a5b01f..0000000 --- a/docs/changelog.md +++ /dev/null @@ -1,25 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [1.0.0] - 2025-08-26 - -### Added -- Initial release of `Then` library -- `@then` attribute for post-execution callbacks -- Support for side-effect separation from main function logic -- Compile-time validation to prevent multiple `@then` attributes per function -- Compatibility with other function attributes (`@doc`, `@spec`, `@deprecated`) -- Support for private callback functions (`defp`) -- Comprehensive test suite -- Documentation with examples and limitations - -### Features -- Clean separation of concerns between pure functions and side effects -- Automatic callback invocation after function execution -- Function result preservation (callbacks don't modify return values) -- Multi-clause function support -- Macro-based implementation for zero runtime overhead diff --git a/docs/license.md b/docs/license.md deleted file mode 100644 index 818a667..0000000 --- a/docs/license.md +++ /dev/null @@ -1,23 +0,0 @@ -# License - -MIT License - -Copyright (c) 2025 bardoor - -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. diff --git a/docs/then.md b/docs/then.md index 4c2ec05..98c254c 100644 --- a/docs/then.md +++ b/docs/then.md @@ -123,4 +123,4 @@ It's simple and clear. Move log and other side-effects out of your beautiful log ## License -`Then` is released under the MIT License - see the [LICENSE](license.html) file. +`Then` is released under the MIT License - see the [LICENSE](../LICENSE) file. diff --git a/mix.exs b/mix.exs index d3cb7d8..a71d495 100644 --- a/mix.exs +++ b/mix.exs @@ -4,13 +4,14 @@ defmodule Then.MixProject do def project do [ app: :then, - version: "1.0.0", + version: "1.1.0", elixir: "~> 1.18", start_permanent: Mix.env() == :prod, deps: deps(), name: "Then", description: description(), - package: package() + package: package(), + docs: docs() ] end @@ -33,6 +34,22 @@ defmodule Then.MixProject do ] end + defp docs do + [ + main: "then", + source_url: "https://github.com/bardoor/then", + extras: [ + "docs/then.md", + "CHANGELOG.md", + "LICENSE" + ], + groups_for_extras: [ + "Documentation": ["docs/then.md"], + "Legal": ["CHANGELOG.md", "LICENSE"] + ] + ] + end + defp deps do [ {:ex_doc, "~> 0.14", only: :dev, runtime: false}