Skip to content

Commit 0a7601c

Browse files
committed
v2.2.1 Game UIs
1 parent ea04203 commit 0a7601c

9 files changed

Lines changed: 20 additions & 30 deletions

File tree

Documentation.pdf

-523 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
@tailwind utilities;
1+
@import "./comps/base.css";
2+
@tailwind utilities;

Misc Assets/Scripting Assets/package.json.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@
44
"switch": "node node_modules/onejs-core/scripts/switch.cjs"
55
},
66
"devDependencies": {
7+
"chokidar": "^4.0.3",
8+
"chokidar-cli": "^3.0.0",
79
"esbuild": "^0.20.0",
810
"fs-extra": "^11.2.0",
911
"postcss": "^8.4.38",
1012
"postcss-cli": "^11.0.0",
13+
"postcss-import": "^16.1.0",
1114
"rimraf": "^5.0.7",
1215
"tailwindcss": "^3.4.17",
1316
"tar": "^7.2.0",
1417
"tiny-glob": "^0.2.9",
1518
"xml2js": "^0.6.2"
1619
},
1720
"dependencies": {
18-
"onejs-core": "^1.0.38",
19-
"onejs-preact": "^1.0.6",
21+
"onejs-core": "^2.0.0",
22+
"onejs-preact": "^2.0.0",
23+
"tailwind-merge": "^2.6.0",
2024
"css-flatten": "^2.0.0",
2125
"css-simple-parser": "^3.0.0"
2226
}
Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,15 @@
11
const tailwindcss = require('tailwindcss')
2-
const ussTransformPlugin = require('onejs-core/scripts/uss-transform-plugin.cjs')
3-
const cleanupPlugin = require('onejs-core/scripts/postcss-cleanup-plugin.cjs')
4-
5-
// Custom logging plugin
6-
const loggingPlugin = {
7-
postcssPlugin: 'postcss-logging-plugin',
8-
Once(root, { result }) {
9-
process.stdout.write('\x1Bc');
10-
console.log('[tailwindcss] compiler started...')
11-
},
12-
OnceExit(root, { result }) {
13-
console.log('[tailwindcss] watching...')
14-
}
15-
};
2+
const ussTransformPlugin = require('onejs-core/scripts/postcss/uss-transform-plugin.cjs')
3+
const cleanupPlugin = require('onejs-core/scripts/postcss/cleanup-plugin.cjs')
4+
const optionalImportPlugin = require('onejs-core/scripts/postcss/optional-import-plugin.cjs')
5+
const loggingPlugin = require('onejs-core/scripts/postcss/tailwind-logging-plugin.cjs')
166

177
module.exports = {
188
plugins: [
19-
loggingPlugin,
9+
loggingPlugin(),
10+
optionalImportPlugin(),
2011
tailwindcss('./tailwind.config.js'),
2112
ussTransformPlugin(),
22-
cleanupPlugin({ remove: ["line-height:", "display:grid", ".items-baseline"] })
13+
cleanupPlugin({ remove: ["line-height:", ".grid"] })
2314
]
2415
}

Misc Assets/Scripting Assets/tasks.json.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,7 @@
4242
{
4343
"label": "tailwind",
4444
"type": "shell",
45-
"command": "npx",
46-
"args": [
47-
"postcss",
48-
"input.css",
49-
"-o",
50-
"../Assets/tailwind.uss",
51-
"--watch"
52-
],
45+
"command": "npx postcss input.css -o ../Assets/tailwind.uss --watch",
5346
"isBackground": true,
5447
"problemMatcher": {
5548
"pattern": [

Misc Assets/Scripting Assets/tsconfig.json.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"compilerOptions": {
33
"baseUrl": ".",
44
"paths": {
5+
"@/*": ["*"],
56
"onejs": [ "node_modules/onejs-core" ],
67
"onejs/*": [ "node_modules/onejs-core/*" ],
78
"preact": [ "node_modules/onejs-preact", "node_modules/preact" ],

Runtime/Engine/Bundler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class Bundler : MonoBehaviour {
3636
public string[] ignoreList = new string[] { "@outputs/tsc", "node_modules", "tmp" };
3737

3838
ScriptEngine _engine;
39-
string _onejsVersion = "2.1.15";
39+
string _onejsVersion = "2.2.1";
4040

4141
void Awake() {
4242
_engine = GetComponent<ScriptEngine>();

ScriptEngine.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ MonoBehaviour:
9393
basePath: '@outputs/esbuild/'
9494
port: 8080
9595
miscSettings:
96-
styleSheetRefreshDelay: 0.1
96+
styleSheetRefreshDelay: 0.25
9797
--- !u!114 &2637249758932584858
9898
MonoBehaviour:
9999
m_ObjectHideFlags: 0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.singtaa.onejs",
3-
"version": "2.1.15",
3+
"version": "2.2.1",
44
"displayName": "OneJS",
55
"description": "OneJS brings JavaScript and many beloved web techs to Unity, seamlessly integrating with UI Toolkit without the need for a browser or webview.",
66
"unity": "2022.3",

0 commit comments

Comments
 (0)