@gesslar/muddy 0.0.1 → 0.2.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 +0 -3
- package/package.json +2 -3
- package/src/Muddy.js +11 -1
package/README.md
CHANGED
|
@@ -64,8 +64,6 @@ Also, shout out to [@Edru2](https://github.com/Edru2) for
|
|
|
64
64
|
|
|
65
65
|
Which is exactly how everybody likes their sex, yes? Yes. Okay.
|
|
66
66
|
|
|
67
|
-
_did you know there's a javascript.com?? I just found that out. holy shit._
|
|
68
|
-
|
|
69
67
|
## License
|
|
70
68
|
|
|
71
69
|
muddy itself is released into the public domain under the
|
|
@@ -80,7 +78,6 @@ licenses:
|
|
|
80
78
|
| [@gesslar/colours](https://github.com/gesslar/colours) | Unlicense |
|
|
81
79
|
| [@gesslar/toolkit](https://github.com/gesslar/toolkit) | Unlicense |
|
|
82
80
|
| [adm-zip](https://github.com/cthackers/adm-zip) | MIT |
|
|
83
|
-
| [archiver](https://github.com/archiverjs/node-archiver) | MIT |
|
|
84
81
|
| [commander](https://github.com/tj/commander.js) | MIT |
|
|
85
82
|
| [xmlbuilder2](https://github.com/oozcitak/xmlbuilder2) | MIT |
|
|
86
83
|
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "gesslar",
|
|
6
6
|
"url": "https://gesslar.dev"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.0
|
|
8
|
+
"version": "0.2.0",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/gesslar/muddy.git"
|
|
@@ -40,12 +40,11 @@
|
|
|
40
40
|
"@gesslar/colours": "^0.8.0",
|
|
41
41
|
"@gesslar/toolkit": "^3.33.0",
|
|
42
42
|
"adm-zip": "^0.5.16",
|
|
43
|
-
"archiver": "^7.0.1",
|
|
44
43
|
"commander": "^14.0.3",
|
|
45
44
|
"xmlbuilder2": "^4.0.3"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
|
-
"@gesslar/uglier": "^1.
|
|
47
|
+
"@gesslar/uglier": "^1.4.0",
|
|
49
48
|
"console-ninja": "^1.0.0",
|
|
50
49
|
"eslint": "^10.0.0",
|
|
51
50
|
"typescript": "^5.9.3"
|
package/src/Muddy.js
CHANGED
|
@@ -512,6 +512,12 @@ export default class Muddy {
|
|
|
512
512
|
|
|
513
513
|
xmlFragments.forEach(e => root.import(e))
|
|
514
514
|
const output = root.end({prettyPrint: true})
|
|
515
|
+
.replaceAll(/(@PKGNAME@|__PKGNAME__)/g, mfile.package)
|
|
516
|
+
.replaceAll(/(@VERSION@|__VERSION__)/g, mfile.version)
|
|
517
|
+
|
|
518
|
+
glog.info(`Substituted all instances of '(@PKGNAME@|__PKGNAME__)' with '${mfile.package}'`)
|
|
519
|
+
glog.info(`Substituted all instances of '(@VERSION@|__VERSION__)' with '${mfile.version}'`)
|
|
520
|
+
|
|
515
521
|
const outputFile = workDirectory.getFile(`${mfile.package}.xml`)
|
|
516
522
|
|
|
517
523
|
glog.info(`XML created successfully, writing it to disk`)
|
|
@@ -633,7 +639,11 @@ export default class Muddy {
|
|
|
633
639
|
glog.info(`Adding contents of '${workDirectory.path}'`)
|
|
634
640
|
mpackage.addLocalFolder(workDirectory.path)
|
|
635
641
|
|
|
636
|
-
const
|
|
642
|
+
const buildDirectory = projectDirectory.getDirectory("build")
|
|
643
|
+
await buildDirectory.assureExists()
|
|
644
|
+
|
|
645
|
+
const mpackageFile = buildDirectory.getFile(`${mfile.package}.mpackage`)
|
|
646
|
+
|
|
637
647
|
if(await mpackageFile.exists)
|
|
638
648
|
await mpackageFile.delete()
|
|
639
649
|
|