@bscotch/yy 2.5.0 → 2.6.0
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.
- package/README.md +41 -4
- package/dist/Yy.d.ts +136 -136
- package/dist/cli.d.mts +3 -0
- package/dist/cli.d.mts.map +1 -0
- package/dist/cli.mjs +39 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/groups.d.ts +8 -0
- package/dist/groups.d.ts.map +1 -0
- package/dist/groups.js +26 -0
- package/dist/groups.js.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/scripts.d.ts +17 -0
- package/dist/scripts.d.ts.map +1 -0
- package/dist/scripts.js +88 -0
- package/dist/scripts.js.map +1 -0
- package/dist/types/utility.d.ts +13 -0
- package/dist/types/utility.d.ts.map +1 -1
- package/dist/types/utility.js +28 -0
- package/dist/types/utility.js.map +1 -1
- package/dist/versioning.d.ts +12 -0
- package/dist/versioning.d.ts.map +1 -0
- package/dist/versioning.js +82 -0
- package/dist/versioning.js.map +1 -0
- package/package.json +2 -2
- package/dist/cli.d.ts +0 -2
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -17
- package/dist/cli.js.map +0 -1
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ In your project root:
|
|
|
35
35
|
|
|
36
36
|
### Programmatic
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Main entrypoint for reading and writing Yy files:
|
|
39
39
|
|
|
40
40
|
```ts
|
|
41
41
|
// In Typescript, or in an ES6 module:
|
|
@@ -48,9 +48,46 @@ parsedFile = await Yy.read('./my-project.yyp');
|
|
|
48
48
|
const reStringified = Yy.stringify(parsedFile);
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
Update the version of a GameMaker project by setting the per-target version fields in all options files:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { setProjectVersion } from '@bscotch/yy';
|
|
55
|
+
await setProjectVersion('my/project.yyp', '1.2.3.4');
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Ensure a script exists, for example to update a script containing version information as part of a build pipeline (note that the [`@bscotch/gml-parser](https://www.npmjs.com/package/@bscotch/gml-parser) project is more full-featured for managing assets):
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
import { addScript } from '@bscotch/yy';
|
|
62
|
+
await addScript('my/project.yyp', 'versioning', 'global.VERSION = 1.2.3.4');
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Ensure a collection of audio or texture groups exist, for example as part of an automatic group-assignment pipeline:
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
import { ensureGroups } from '@bscotch/yy';
|
|
69
|
+
await ensureGroups('my/project.yyp', 'audio', [
|
|
70
|
+
'MyAudioGroup',
|
|
71
|
+
'MyOtherAudioGroup',
|
|
72
|
+
]);
|
|
73
|
+
await ensureGroups('my/project.yyp', 'texture', [
|
|
74
|
+
'MyTextureGroup',
|
|
75
|
+
'MyOtherTextureGroup',
|
|
76
|
+
]);
|
|
77
|
+
```
|
|
78
|
+
|
|
51
79
|
### CLI
|
|
52
80
|
|
|
53
|
-
|
|
81
|
+
This package provides a few CLI commands, available with the command `yy` if globally installed (e.g. by `npm i -g @bscotch/yy`) or by `npx yy` for a local install.
|
|
82
|
+
|
|
83
|
+
### `yy diff`
|
|
84
|
+
|
|
85
|
+
Get a diff between two `.yy`/`.yyp`-like files:
|
|
86
|
+
|
|
87
|
+
`yy diff file1.yy file2.yy`
|
|
88
|
+
|
|
89
|
+
### `yy version`
|
|
90
|
+
|
|
91
|
+
Set the projects version via all of its Options files, so that all platforms will be synced to a particular version:
|
|
54
92
|
|
|
55
|
-
|
|
56
|
-
- If locally installed: `npx yy diff file1.yy file2.yy` (or similar, depending on your Node package manager)
|
|
93
|
+
`yy version path/to/project.yyp 1.2.3.4`
|