Skip to content

Commit b9b2383

Browse files
committed
chore: added README
1 parent a0570c4 commit b9b2383

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Scriptify DTS Generator
2+
Generator for TypeScript declarations Scriptify functions and constants
3+
4+
## Example
5+
Generate functions and constant declarations
6+
```java
7+
ScriptTsDeclarationGenerator generator = new ScriptTsDeclarationGenerator(script);
8+
// Generated declaration string
9+
String declaration = generator.generate();
10+
// Save generated declaration
11+
generator.save(Path.of("types.d.ts"));
12+
```
13+
Generate TypeScript (with JavaScript support) project with declarations
14+
```java
15+
ScriptTsProjectGenerator generator = new ScriptTsProjectGenerator(script);
16+
generator.generate(Path.of("code"));
17+
```
18+
19+
## Maven
20+
Adding repo:
21+
```xml
22+
<repositories>
23+
<repository>
24+
<id>instancify-repository-snapshots</id>
25+
<url>https://repo.instancify.app/snapshots</url>
26+
</repository>
27+
</repositories>
28+
```
29+
30+
Adding dependency:
31+
```xml
32+
<dependency>
33+
<groupId>com.instancify.scriptify.declaration</groupId>
34+
<artifactId>generator</artifactId>
35+
<version>1.0.0-SNAPSHOT</version>
36+
</dependency>
37+
```
38+
39+
## Gradle
40+
Adding repo:
41+
```groovy
42+
maven {
43+
name "instancifyRepositorySnapshots"
44+
url "https://repo.instancify.app/snapshots"
45+
}
46+
```
47+
48+
Adding dependency:
49+
```groovy
50+
implementation "com.instancify.scriptify.declaration:generator:1.0.0-SNAPSHOT"
51+
```

0 commit comments

Comments
 (0)