@opys/dev 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +57 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # @opys/dev
2
+
3
+ [![npm](https://img.shields.io/npm/v/@opys/dev.svg)](https://www.npmjs.com/package/@opys/dev)
4
+
5
+ Build SDK for opys: `defineConfig`, the build engine, the plugin
6
+ contract, artifact overrides, an artifact scanner, plus shared
7
+ fetchers (GitHub Releases today; GitLab and Maven next) used by every
8
+ loader plugin.
9
+
10
+ ```sh
11
+ npm install @opys/dev @opys/core
12
+ ```
13
+
14
+ ```js
15
+ import { defineConfig } from '@opys/dev';
16
+ import { forge } from '@opys/forge';
17
+ import { java } from '@opys/java';
18
+
19
+ export default defineConfig({
20
+ output: 'opys.json',
21
+ plugins: [forge('1.20.1-best'), java('17')],
22
+ manifest: {
23
+ command: ({ java }) => java.bin,
24
+ args: ({ forge }) => [forge.jvmArgs, forge.mainClass, forge.gameArgs],
25
+ workdir: '${game_directory}',
26
+ },
27
+ });
28
+ ```
29
+
30
+ ### Plugin authors
31
+
32
+ ```js
33
+ import { definePlugin, gitHubReleaseArtifacts } from '@opys/dev';
34
+
35
+ export function myLoader(version) {
36
+ return definePlugin({
37
+ name: 'myloader',
38
+ async build() {
39
+ const { artifacts } = await gitHubReleaseArtifacts(
40
+ 'me/myloader',
41
+ version,
42
+ {
43
+ assets: [
44
+ {
45
+ match: (a) => a.name.endsWith('.jar'),
46
+ path: '${mods_directory}/myloader.jar',
47
+ },
48
+ ],
49
+ },
50
+ );
51
+ return { artifacts };
52
+ },
53
+ });
54
+ }
55
+ ```
56
+
57
+ Part of the [opys](https://github.com/harmoniya-net/opys) toolkit.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opys/dev",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "exports": {
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "type": "module",
21
21
  "dependencies": {
22
- "@opys/core": "^0.1.6"
22
+ "@opys/core": "^0.1.7"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "zod": "^4.0.0"