From ef4bfed752d2bd979860793d8b8111983337aeb0 Mon Sep 17 00:00:00 2001 From: Gerardo Rodriguez <44345493+gerardorodriguezdev@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:46:00 +0000 Subject: [PATCH] Adds README.md for core library --- README.md | 2 +- core/README.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 core/README.md diff --git a/README.md b/README.md index bc05f8d..f6e78ef 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,6 @@ For ease of use you should use both the [Gradle Plugin](gradle-plugin) and the [ The project is separated into 3 different projects: -- **core:** The actual code that makes the magic +- **core:** The actual code that makes the magic [Core library](core) - **gradle-plugin:** Gradle plugin to use Chamaleon [Gradle Plugin](gradle-plugin) - **intellij-plugin:** Intellij plugin to switch between the different environments [Intellij Plugin]() \ No newline at end of file diff --git a/core/README.md b/core/README.md new file mode 100644 index 0000000..d0636a1 --- /dev/null +++ b/core/README.md @@ -0,0 +1,18 @@ +# Chamaleon Core + +Library that parses the `cha` files and returns the set of environments. +It's consumed by the [Gradle plugin](../gradle-plugin) and the [Intellij Plugin]() + +## How it works? + +Just create an EnvironmentsProcessor, and it will parse the directory provided and give you the environments if present + +````kotlin +val file = File("MyDirectory") + +val environmentsProcessor = EnvironmentsProcessor(file) + +val environments = environmentsProcessor.environments() + +val someEnvironment = environments.first() +```` \ No newline at end of file