Skip to content

Commit

Permalink
Merge pull request #11 from Caaz/1.4
Browse files Browse the repository at this point in the history
Update for 1.4!
  • Loading branch information
Daniel Cavazos authored Nov 6, 2022
2 parents ed8e200 + 900f4de commit dc4424c
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ obj
node_modules

# Ignore built files
Assemblies
1.4/Assemblies
*.xml
*.csproj

Expand Down
Binary file added 1.3/Assemblies/Creepers.dll
Binary file not shown.
Binary file modified About/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Pug/About.pug
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ModMetaData
packageId=packageId
supportedVersions
li 1.3
li 1.4
loadAfter
li UnlimitedHugs.HugsLib
modDependencies
Expand Down
8 changes: 4 additions & 4 deletions Pug/csproj.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Project(Sdk="Microsoft.NET.Sdk")
PropertyGroup
RootNamespace=namespace
AssemblyName=assemblyName
OutputPath Assemblies
OutputPath 1.4/Assemblies
VersionPrefix=version
OutputType Library
TargetFramework net472
Expand All @@ -12,8 +12,8 @@ Project(Sdk="Microsoft.NET.Sdk")
AppendTargetFrameworkToOutputPath false
Deterministic false
ItemGroup
PackageReference(Include="Krafs.Rimworld.Ref" Version="1.3.3326")/
PackageReference(Include="Lib.Harmony" Version="2.2.1")
PackageReference(Include="Krafs.Rimworld.Ref" Version="1.4.3537")/
PackageReference(Include="Lib.Harmony" Version="2.2.2")
ExcludeAssets runtime
PackageReference(Include="UnlimitedHugs.Rimworld.HugsLib" Version="9.0.1")
PackageReference(Include="UnlimitedHugs.Rimworld.HugsLib" Version="10.0.1")
ExcludeAssets runtime
8 changes: 8 additions & 0 deletions Pug/loadFolders.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include Mixins/Mixins.pug
mixin Version(version, ...items)
#{"v"+version}
li /
li= version
loadFolders
+Version(1.3)
+Version(1.4)
16 changes: 10 additions & 6 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import fs from 'node:fs';
import process from 'node:process';
import pug from 'pug';

import metadata from './metadata.json' assert { type:"json" };
import metadata from './metadata.json' assert { type: "json" };

const env = process.argv[2] || 'dev';
console.log('Building for environment %s', env);

const data = {
...metadata["default"],
...(metadata[env] || {})
...metadata["default"],
...(metadata[env] || {})
}

fs.readdir('Pug', (error, files) => {
Expand All @@ -19,17 +19,21 @@ fs.readdir('Pug', (error, files) => {
let xmlName = name + '/' + name + '.xml';
if (name === 'csproj') {
xmlName = data.assemblyName + '.csproj';
} else if (name == 'loadFolders') {
xmlName = name + '.xml';
} else if (name === 'html') {
xmlName = data.assemblyName + '.html';
} else {
fs.mkdir(name, _ => {});
fs.mkdir(name, _ => { });
}

console.log('Rendering ' + name);
const renderer = pug.compileFile('Pug/' + file, {pretty: true});
const renderer = pug.compileFile('Pug/' + file, { pretty: true });
fs.writeFile(xmlName, renderer(data), error_ => {
if (error_) {
console.error(error_);
}
});
}
}
});
});
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Creepers",
"author": "Caaz, ShoujoDev",
"description": "Aw, Man",
"version": "1.0.0.0",
"version": "1.1.0.0",
"packageId": "caaz.creepers",
"namespace": "Creepers",
"assemblyName": "Creepers"
Expand Down

0 comments on commit dc4424c

Please sign in to comment.