Skip to content

Commit

Permalink
feat(#52): readme
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Jan 25, 2024
1 parent 53c98a8 commit c20fcd9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 9 deletions.
46 changes: 43 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ lighter EO code.
# How to use

To run the plugin you need at least Maven 3.1.+ and Java 11+.
The plugin provides single `fuse` optimization that scans the directory and checks if there's any
`.xmir` file where the next code occurs:
The plugin provides two optimizations:

### FUSE
The optimization scans the directory and checks if there's any`.xmir` file where the next code occurs:

```xml
<o base=".new">
Expand All @@ -47,6 +49,37 @@ next one:
</o>
```

### STATICIZE
The optimization scans the directory and checks if there's any`.xmir` file where the next code occurs:

```xml
<o base=".get">
<o base=".new">
<o base="A"/>
<o base="int" data="bytes">
<!-- BYTES HERE -->
</o>
</o>
</o>
```

The plugin adds new staticized `StaticizedA.xmir` file into the directory and replaces the `xmir` above with the
next one:

```xml

<o base=".get">
<o base=".new">
<o base="StaticizedA"/>
<o base="int" data="bytes">
<!-- BYTES HERE -->
</o>
</o>
</o>
```

Meantime `StaticizedA` will use static method instead of instance one.

Objects `A` and `B` must be from the same package and have the same prefix.

[Here](https://github.com/objectionary/benchmark) you may find a working example that uses the
Expand All @@ -65,7 +98,7 @@ configuration to your `pom.xml` file:
<plugin>
<groupId>org.eolang</groupId>
<artifactId>ineo-maven-plugin</artifactId>
<version>0.1.2</version>
<version>0.2.0</version>
<executions>
<execution>
<id>fuse</id>
Expand All @@ -74,6 +107,13 @@ configuration to your `pom.xml` file:
<goal>fuse</goal>
</goals>
</execution>
<execution>
<id>staticize</id>
<phase>generate-sources</phase>
<goals>
<goal>fuse</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
6 changes: 0 additions & 6 deletions src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ SOFTWARE.
</head>
<menu name="Overview">
<item name="Introduction" href="./index.html"/>
<!--
@todo #34:30min For some reason, the "plugin-info.html" page is not generated
by the maven-site-plugin, but it should. The confirmation is very similar to,
for example, jcabi-dynamodb-maven-plugin, where the "plugin-info.html" page
is generated automatically. Let's find out what is the problem and fix.
-->
<item name="Goals" href="./plugin-info.html"/>
</menu>
<menu ref="reports"/>
Expand Down

0 comments on commit c20fcd9

Please sign in to comment.